Size of a JavaScript variable
What can be the maximum size of the javascript variable? I want to store a String into a Javascript variable.
What can be the maximum size of the javascript variable? I want to store a String into a Javascript variable.
Apologies for the inconvenience caused. I have already posted it on one of the JavaScript forums but didnt get any reply. So thought of posting it here.
> Apologies for the inconvenience caused. I have
> already posted it on one of the JavaScript forums but
> didnt get any reply. So thought of posting it here.
what on earth for? this isn't a javascript forum. The languages have almost nothing in common.
At any rate, Javascript is loosely typed, so asking about the maximum value of a javascript variable doesn't really make sense.
Just playing around cuz I was curious... in IE this works, with JS and VB functions calling each other. Variables don't seem to be visible across languages though.
<HTML>
<HEAD>
<TITLE>VBScript Test Page</TITLE>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub TestButton_OnClick()
MsgBox "VBScript function called, going to call JavaScript function now..."
callJS()
End Sub
Sub callVB()
MsgBox "JavaScript function called this VBScript function!"
End Sub
-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function doJS() {
alert("JavaScript function called, going to call VBScript function now...");
callVB();
}
function callJS() {
alert("VBScript function called this JavaScript function!");
}
-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE=BUTTON LANGUAGE="VBScript" VALUE="with vb!" NAME="TestButton">
<HR>
<INPUT TYPE=BUTTON VALUE="with js!" onclick="doJS();">
<HR>
</BODY>
</HTML>
> Variables don't seem to be visible across languages
> though.
You could abuse hidden form variables to achieve that though.
> Back to work! I was joking!!
Hey for all you know my work might consist of implementing AJAX through VBScript!
> > Variables don't seem to be visible across languages
> > though.
>
> You could abuse hidden form variables to achieve that
> though.
yes, and I assume returning values from functions works, so a special get/set variable function would be doable. (in case anyone cares to really limit themselves to IE)