Jump to content

sending javascript variables through post?


blueman378

Recommended Posts

hi guys, well i have this here,

<html>
<head>
<title>Web Spirited - BBcode editor</title>
</head>

<body>

<div align="center" >
<table border="0" width="800" >
	<tr>
		<td><b><font face="Verdana">Preview Submit</font></b></td>
	</tr>
	<tr>
		<td><hr></td>
	</tr>
	<tr>
		<td><div id="preview_innerhtml" style="overflow:auto;height:100px;width:100%;border:2px solid #6593CF;background-color:#DBE6F3;font-family: Verdana, Tahoma, Arial;font-size:12px;"></div></td>
	</tr>
	<tr>
		<td><b><font face="Verdana">BBCode Output</font></b><br><textarea name="message" id="message" style="width:100%;height:100px;"></textarea></td>
	</tr>
</table>
</div>

<div align="center">
<table border="0" width="800">
	<tr>
		<td align=center>
			<style type='text/css'>@import url(styles/office2007/style.css);</style>			
			<script language="JavaScript" type="text/javascript" src="editor.js?version=4.2"></script>				
			<script language="JavaScript" type="text/javascript">
				var getdata ="[b]Test me[/b]";
				//Flag "min" will show Mini toolbar - "max" will show 2 toolbars - config inside editor.js
				Instantiate("min","editor", getdata , "600px", "200px");

				function get_hoteditor_data(){
					setCodeOutput();
					var html_output = document.getElementById("hoteditor_html_ouput_editor").value;//Output to HTML code
					var bbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Output to BBCode
					document.getElementById("message").value = bbcode_output;
					document.getElementById("preview_innerhtml").innerHTML=html_output;
				}

			</script>							
		</td>
	</tr>
	<tr>
		<td align=center><a href=# onclick="get_hoteditor_data();"><b>[submit / Preview]</b></a></td>
	</tr>

</table>
</div>

</body>

</html>

 

basically its a editor thing, never mind the acctualy javascript for that, but its a editor thing,

 

the two variables that i need are html_output, and bbcode_output, how would i modify this so it sends it to a php page via post? i know how to do it through get but not post

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.