sandravega
Programmer
Hi, I want something as simple as:
having a flash button, with this code:
on (press) {
sec = "mysection";
getURL("pagina2.htm", "_self", "GET");
}
and having pagina2.htm with this other code (some javascript here, just to read the querystring)
<script type="text/javascript">
function getFieldValue (strFieldName)
{
var strFieldValue;
var objRegExp = new RegExp(strFieldName + "=([^&]+)","gi");
if (objRegExp.test(location.search))
strFieldValue = unescape(RegExp.$1);
else strFieldValue="mongo";
return strFieldValue;
}
alert (getFieldValue ('sec'));
</script>
This is supposed to give a javascript dialog box saying "mysection", mean, the value from the var "sec" set in the caller flash script.
But I can`t get with it.
Of course, if I call the pagina2.htm with the url
pagina2.htm?sec="whatever"
I get the dialog box saying "whatever", the javascript stuff is just to capture the querystring var. My goal is to send a "get" from flash that can be readable from asp, php or html code... and I can`t.
Any ideas?
Sandra
By the way: some of you, when post some code, send it with a special format that makes de answer more readable... I wonder how do you do that
Thank your everybody
having a flash button, with this code:
on (press) {
sec = "mysection";
getURL("pagina2.htm", "_self", "GET");
}
and having pagina2.htm with this other code (some javascript here, just to read the querystring)
<script type="text/javascript">
function getFieldValue (strFieldName)
{
var strFieldValue;
var objRegExp = new RegExp(strFieldName + "=([^&]+)","gi");
if (objRegExp.test(location.search))
strFieldValue = unescape(RegExp.$1);
else strFieldValue="mongo";
return strFieldValue;
}
alert (getFieldValue ('sec'));
</script>
This is supposed to give a javascript dialog box saying "mysection", mean, the value from the var "sec" set in the caller flash script.
But I can`t get with it.
Of course, if I call the pagina2.htm with the url
pagina2.htm?sec="whatever"
I get the dialog box saying "whatever", the javascript stuff is just to capture the querystring var. My goal is to send a "get" from flash that can be readable from asp, php or html code... and I can`t.
Any ideas?
Sandra
By the way: some of you, when post some code, send it with a special format that makes de answer more readable... I wonder how do you do that
Thank your everybody