|
Author |
Message |
goldberg_312
Junior WebHelper
Joined: 27 May 2003
Posts: 5
Location: Florida
|
Posted:
Tue May 27, 2003 1:36 pm (20 years, 11 months ago) |
|
Hey guys, I'm not a master of code so maybe you can help me with a predicament I'm in. I'm trying to link from a website that is not frames to a 3rd party shopping cart software which I would like to put in an iframe on a page called "cart.html" The way this is currently set up is to have a link that is coded to add the different products (www.cartwebsite.com?cartid^productinfo). Is there a way to do this?
In case I didnt explain clearly, I have 2 pages, reloadables.htm, and cart.html. cart.html has an iframe on it. I want to have a link that goes from reloadables.htm to cart.html and dynamically sets the iframe to another page.
Thanks for your time. |
________________________________ -Josh |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Tue May 27, 2003 4:21 pm (20 years, 11 months ago) |
|
PHP would be the easiest way to do it:
Code: | <?php
echo('<iframe src="http://www.cartwebsite.com.com/?cartid='.$_GET['cartid'].'"></iframe');
?> |
You'd then call this script: script.php?cartid=whatever, and it would load http://www.cartwebsite.com.com/?cartid=whatever. Or am I going off on a false track? |
________________________________
|
|
|
|
goldberg_312
Junior WebHelper
Joined: 27 May 2003
Posts: 5
Location: Florida
|
Posted:
Tue May 27, 2003 5:59 pm (20 years, 11 months ago) |
|
I dont know if this will affect anything, but the link I'm putting in the iframe has a "?" in it. Heres what an actual link is:
<a href=http://www.cartserver.com/sc/cart.cgi?item=a-1358^123^book^5.11^1">add to cart</a>
It's a third party software thats run from their servers, so the cart id (ie. a-1358) tells them to use my cart with my settings and to send the order to me, etc. The other info separated by the " ^ " passes along all the information needed for each item added. This link would add 1 book for $5.11 to the cart. See?
Will the php still work with this? If so please explain how I implement that because I'm not in the least bit familiar with php.
Thanks again for your help. |
________________________________ -Josh |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Tue May 27, 2003 6:22 pm (20 years, 11 months ago) |
|
Just link to script.php?item=123^book^5.11^1 and then use this code for the iframe:
Code: | <?php
echo('<iframe src="http://www.cartserver.com/sc/cart.cgi?item=a-1358^'.$_GET['item'].'"></iframe');
?> |
|
________________________________
|
|
|
|
goldberg_312
Junior WebHelper
Joined: 27 May 2003
Posts: 5
Location: Florida
|
Posted:
Tue May 27, 2003 6:51 pm (20 years, 11 months ago) |
|
So I just change the name of cart.html to script.php and use that code for the iframe and it will work?
Thanks a bunch |
________________________________ -Josh |
|
|
|
goldberg_312
Junior WebHelper
Joined: 27 May 2003
Posts: 5
Location: Florida
|
Posted:
Tue May 27, 2003 10:13 pm (20 years, 11 months ago) |
|
I just used the code like you said and the iframe didnt show up on the script.php page. I copied the link you supplied into reloadables.htm and the iframe code into cart.html which i renamed script.php and when i clicked the link it opened script.php fine but didnt open the iframe. They were uploaded to the server at the time as test files. Am I missing something? Like I said, my knowledge of PHP is akin to my knowledge of the cultural diversities of Bulgaria.
Thanks yet again for your time. |
________________________________ -Josh |
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.126019 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |