-
Urgent Help
Hi all,
i have a small problem and i donno how to pass a value from asp code to javascript
code and from javascript code to asp code ...
i have a asp form ... on body load i need it to be directed to another form
called "Style.asp" wich need a value called step.
so i tried this code and i got always "StepCode" the value of step, meanwhile
the value returned by <%Request.QueryString("step")%> could be "p" or "g"
so any help or suggestion ???
thx in advance
<script language="Javascript">
function refreshFrame(StepCode) {
window.parent.frmStyle.location.href='Style.asp?step="StepCode"';
window.open;
return true;
}
</script>
<body onload="return refreshFrame('<%Request.QueryString("step")%>');">
Paul
-
Re: Urgent Help
It's right in front of you...
>window.parent.frmStyle.location.href='Style.asp?step="StepCode"';
>the value returned by <%Request.QueryString("step")%> could be "p" or "g"
Combine the two, and you get:
window.parent.frmStyle.location.href='Style.asp?step=<%=Request.QueryString(
"step")%>;
Also, this line:
><body onload="return refreshFrame('<%Request.QueryString("step")%>');">
Should read
<body onload="return refreshFrame('<%=Request.QueryString("step")%>');">
Note the '='.
Paul wrote in message <3abf0045$1@news.devx.com>...
>
>Hi all,
>
>i have a small problem and i donno how to pass a value from asp code to
javascript
>code and from javascript code to asp code ...
>
>i have a asp form ... on body load i need it to be directed to another form
>called "Style.asp" wich need a value called step.
>
>so i tried this code and i got always "StepCode" the value of step,
meanwhile
>the value returned by <%Request.QueryString("step")%> could be "p" or "g"
>
>so any help or suggestion ???
>
>thx in advance
>
>
><script language="Javascript">
>function refreshFrame(StepCode) {
>window.parent.frmStyle.location.href='Style.asp?step="StepCode"';
>window.open;
>
> return true;
>}
></script>
><body onload="return refreshFrame('<%Request.QueryString("step")%>');">
-
Re: Urgent Help
"Paul" <paul@namtek.ca> wrote in message news:3abf0045$1@news.devx.com...
> i have a small problem and i donno how to pass a value from asp code to
javascript
> code and from javascript code to asp code ...
Hi Paul.
JavaScript can access variables which were created in asp, but not the other
way around. Because asp runs on the server, and JavaScript on the client,
the JavaScript will have access to any asp on the page, but the asp on the
page will already be done executing when the JavaScript runs. To pass
variables from JavaScript back to the ASP, you'll have to send the request
back to the server.
i.e:
------------------------------
<%
intBoink = Request("boink")
%>
<SCRIPT LANGUAGE="JavaScript">
function checkboink(valBoink)
{
if (valBoink < 1)
{location.replace('Boink.asp?LessThan1=true')}
}
</SCRIPT>
<BODY onLoad="checkboink(<%=intBoink%>)">
------------------------------
I hope that makes sense.
--
Devin
Senior Developer
WebNW, LLC
http://www.mp3.com/DevinK
_______________________________________________________
Look on the bright side... After the next four years,
we'll probably never have to deal with another Republican
President in our lifetime.
-
Re: Urgent Help
hi
i need the source code to get the file content in to a textarea using javascript
can u pls help me out as soon as possible
thanking u
manoj
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks