...

View Full Version : Get Method Question(There is something i nee to know)



Rudurk
07-31-2006, 12:28 AM
Hi i have been trying to use method="get" to send field values form purchase.html to ticket.html but when i press submit all it does is take me to ticket doesnt put in the value i figure out why because you need this javascript to make it work so basically i wanted to know what the javascript actually does coz its a bit advance for me. please if you could explain i would be really grateful

so this is what i did
purchase.html

<form id="form2" name="form2" method="get" action="ticket.html" Target="main" ><font color="#99FFFF">

so when clicked on submit it will take me to
ticket.html
in ticket.html this bit of javascript takes place

<script type="text/javascript">
function getFieldValue (strFieldName)
{
var strFieldValue;
var Tickets = new RegExp(strFieldName + "=([^&]+)","gi");

if (Tickets.test(location.search)) {
strFieldValue = unescape(RegExp.$1);
}
else strFieldValue="";

return strFieldValue;
}
</script>

and to write the values i have to have this whereever i want the values to be written

<script type="text/javascript">
document.write(getFieldValue("name"))
</script>

can i know what that javascript does and if there is any other way to do the same thing with out the javascript or with a simpler javascript

it doesnt matter to much about simpler javascript or another way

But i need to know exactly what the script does please explain this script thank you


]<script type="text/javascript">
function getFieldValue (strFieldName)
{
var strFieldValue;
var Tickets = new RegExp(strFieldName + "=([^&]+)","gi");

if (Tickets.test(location.search)) {
strFieldValue = unescape(RegExp.$1);
}
else strFieldValue="";

return strFieldValue;
}
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum