Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

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 Codewalkers Forums Sponsor:
  #1  
Old April 13th, 2005, 05:30 AM
cenetti cenetti is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 cenetti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Java Form

I have a form written in html but its controlled by javascript. Form basically updates a graph according to the selected fields by the user.

on the same page i have another script which needs to use one or two values from the selected fields.

the only way to do is to display the form values
in the address bar, so that other script can take it from there.

the problem is that java collects the form values and processes the graph but it doesnt display the form values in the adress bar.

is there a way to display those values in the address bar?

example : mathgraph.php?x=12&y=34&lenght=60....etc

here is the java code

<SCRIPT LANGUAGE="Javascript">

//Cross browser method to get an object
function getObject(id)
{
if (document.getElementById)
//IE 5.x or NS 6.x or above
return document.getElementById(id);
else if (document.all)
//IE 4.x
return document.all[id];
else
//Netscape 4.x
return document[id];
}

//Update the chart according to user selection
function updateChart()
{
//
//we encode the values of all form elements as query parameters
//
var elements = getObject("Form1").elements;
var url = "mathgraph.php?";
for (var i = 0; i < elements.length; ++i)
{
var e = elements[i];
if (e.type == "checkbox")
url = url + e.id + "=" + (e.checked ? "1" : "0") + "&";
else
url = url + e.id + "=" + escape(e.value) + "&";
}

//Now we update the URL of the image to update the chart
getObject("ChartImage").src = url;
}
</SCRIPT>



Thank you,

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Java Form


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT