FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » how to pass text set in a javascript?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: how to pass text set in a javascript? [message #178864 is a reply to message #178863] Thu, 16 August 2012 01:19 Go to previous messageGo to previous message
thejustpark is currently offline  thejustpark
Messages: 5
Registered: August 2012
Karma:
Junior Member
Thank you guys so much!
I know that in order to answer this, you guys put your time and effort to read, think, and speak.
So I really appreciate this guys.

I realize that some syntactic errors are in the page.
I don't have them in my code, but when I make up this example, I made such mistakes.
Below is the working example with the same problem.

<script type="text/javascript">
<!--
function loadExample() {
document.forms["region"].elements['fgData'].value = "asdf";
alert("asdf");
}
//-->
</script>

<form name="region" action="calculator_sub.php" method="post" enctype="multipart/form-data" target="_self">
<textarea id="fgData" name="fgData" class="xxlarge" rows="10" disabled="disabled"> </textarea>
<input type="button" value="Example load" onclick="loadExample();">
<input type="submit" class="btn primary" id="submit_button" value="Submit">
</form>

But in passing the argument to next.php, I see that '$_POST' doesn't deliver fgData to next.php,
as I have
<?php
echo "<pre>";
print_r($_POST);
echo "</pre>";
?>
in next.php, there isn't even a variable named fgData.
What do you think I should look into?

P.S. I kinda think it is related to php, because my understanding is that after the javascript function writes it to the textarea, it is php who should read and pass to next.php.

Thanks,
Justpark.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHPUnit documentation
Next Topic: Create hierarchical tree structure for categories in joomla
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 15:40:33 GMT 2024

Total time taken to generate the page: 0.04690 seconds