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.

[116 byte] By [Anushka_Shaha] at [2007-11-27 10:22:12]
# 1

javascript != java.

You need to find a javascript forum for this.

petes1234a at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 2

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.

Anushka_Shaha at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 3

> 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.

petes1234a at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 4

At any rate, Javascript is loosely typed, so asking about the maximum value of a javascript variable doesn't really make sense.

jGardnera at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 5

how long are you talking? Probably it can hold a lot more then you would ever need to.

bsampieria at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 6

Would anyone mind answering a VBScript question, while we're at it?

BigDaddyLoveHandlesa at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 7

Sure, go ahead...

bsampieria at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 8

How can I integrate VBScript and JavaScript on the same page?

BigDaddyLoveHandlesa at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 9

Use IE? vbscript != java

bsampieria at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 10

> vbscript != java

D'oh!

BigDaddyLoveHandlesa at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 11

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>

bsampieria at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 12

> Variables don't seem to be visible across languages

> though.

You could abuse hidden form variables to achieve that though.

cotton.ma at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 13

Back to work! I was joking!!

BigDaddyLoveHandlesa at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 14

> Back to work! I was joking!!

Hey for all you know my work might consist of implementing AJAX through VBScript!

cotton.ma at 2007-7-28 17:14:33 > top of Java-index,Java Essentials,New To Java...
# 15

> > 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)

bsampieria at 2007-7-28 17:14:38 > top of Java-index,Java Essentials,New To Java...