Click to See Complete Forum and Search --> : How to pass parameters from VBscript?
wernerh
Feb 12th, 2001, 11:55 PM
How can I pass parameters to reload a IFRAME from within vbscript:
<Script=vbs>
FrameName.document.location.reload("Mypage.asp?MyVar=' & text1.value & '&Myvar2=' &text2.value")
</Script>
It doesnt give me any syntax errors, but it doesnt seen to be receiving any of the values!
Please help!
BigBoy
Feb 13th, 2001, 04:23 AM
Hey amigo!
I don't think that will work. I had the same problem a few days back, but using JavaScript. But, I found a way around it!
Try creating a form, and then instead of reloading the page, simply assign the values to hidden fields in the form, and send the form using GET (assign to q-string).
Hope this help?
I did it like this :
<form name =YourName>
<iframe src="Mypage.asp?MyVar=' & text1.value '&Myvar2=' &text2.value">
</iframe>
</form>
Or instead you can do in javascript:
YourIFRAME.Navigate("Mypage.asp?MyVar=' & text1.value ")
In this case your asp page shows up inside of frame.
But don't forget , NN does not know IFRAME !
Another tricky part, is to send values from Mypage.asp
to parent page, you have to use something like :
When child form loads, do it in body onload:
parent.form.element.value=iframeForm.element.value,
It will not work other way around!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.