Click to See Complete Forum and Search --> : Getting form values in IFRAME page
ramesh_cr
October 24th, 2005, 12:21 PM
Hi,
How can i get Form values in IFrame. I have the following situation.
In First Page, I have hidden input variable (x) assigned and it redirects to second page.
On the second page, I use IFrame (IFramePage.asp). Now I want to get the value of x in IFramePage.asp using Request.Form.
This is because the value of x will be very long.
Thanks
Ramesh
PeejAvery
October 24th, 2005, 12:23 PM
Call to the window, then the form, then the object, then the value.
parent.IFRAME.FORM.OBJECT.value
ramesh_cr
October 24th, 2005, 12:29 PM
Thanks for reply..
Where should I make this call in IFramePage.asp.
In Javascript?
Once I get this value, I want to pass this value to database.
Thanks
Ramesh
PeejAvery
October 24th, 2005, 01:02 PM
I think you misunderstand naming frames.
Here is the IFRAME tag.
<iframe name="framename"></iframe>
Here is the FORM tag.
<form name="formsubmit">
<input type="text" name="txtbot">
</form>
Here is the JavaScript call.
window.alert(parent.framename.formsubmit.txtbox.value);
ramesh_cr
October 25th, 2005, 05:02 PM
This works fine for me. But only trouble is I want to use this variable in ASP. Should I Post this IFrame Page again to another page inorder to get this value and pass to database.
Thanks
Ramesh
PeejAvery
October 25th, 2005, 05:08 PM
But only trouble is I want to use this variable in ASP. Should I Post this IFrame Page again to another page inorder to get this value and pass to database.
I am kind of confused. Are you saying you want the ASP to pick this information off the IFRAME?
You will have to interpret that code into POST or browser line so that ASP can read it.
airmvp23
November 22nd, 2011, 01:41 PM
This is similar to what I am looking for...........
I've been round and round with this subject, but here goes again. Basically I need to Click a Form Button and submit that click into an iframe located on a separate page.
The history behind this is that I am using Joomla for my main platform, but needed a more powerful shopping cart for my site than the standard Joomla carts. Both platforms are in php, but I can't seem to get that to work either because I am not savvy enough to use it.
Keep in mind currently the iframe methods works, but it will not send the form data all the way inside the shopping cart...it stops at the first page of the cart.
I have a joomla page with this form in it...
<form action="http://www.xxxxx.com/xxxxx-cart/index.php" method="post" name="cart"> <input name="m" value="add" type="hidden"> <input name="quantity" value="1" type="hidden"> <input name="productID" value="33" type="hidden"> <input name="pers[33][24]" value="29" type="hidden"> <input src="https://www.xxxxxx.com/cart/images/purchasebutton-cd.png" name="cd" value="Buy CD" type="image">
The post is sent to a joomla template that has an iFrame setup inside of it that looks like this...
<IFRAME SRC="http://www.xxxxxx.com/cart/cart.php" id="cart" name="cart" marginwidth="0" marginheight="0" width="100%" height="100%" FRAMEBORDER="0" scrolling="no" noresize></IFRAME>
This iframe displays the main shopping cart page inside the joomla template.
When submitted the Form is supposed to go through the iframe and hopefully be read by the cart to display the item that was just add from the Joomla Template on the outside, but as I said it only goes to the First Page of the Shopping cart and doesn't add any items to the cart.
I'm not sure if this is a javascript thing, but I heard it might be.
Any help would be appreciated.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.