JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 19th, 2000, 09:57 PM
ebryan ebryan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Laurens, SC ,US
Posts: 20 ebryan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Within a php page (call it page1) I use PHP to fill in values for a javascript function. That function completes by opening a new page (window.open) and displaying the user's selection using the following:

<Script
(lines...)
document.write("<INPUT Type='text' NAME='ItemID' size='4' VALUE=" + opener.items[i].ItemID + ">");
(...lines)
</SCRIPT>

Further down in the php3 section I have a form to get the selection into the cart:

<?PHP
(lines...)
echo "<INPUT TYPE="hidden" NAME="UID" VALUE="$UID">";
(...lines)
mysql("$DBName","INSERT INTO TableName VALUES
('$UID','$ItemID',etc....);
%>

Somewhere before the form I need a way to say $ItemID is equal to the value in opener.items[i].ItemID. I'm pretty new to this and manage to make progress by trial and error but am stumped. I don't understand the syntax needed and can't figure out if I have to do it within the <Script></Script> tags. Guidance is greatly appreciated.

P.S. In case you are wondering why I don't just use the original values that were input into the array from the database, long story but there is a reason.



------------------
Thanks for the help.
ebryan@lumenet.com

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Obtain javascript array value for PHP

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap