how to pass values to client side javascript include file? Thanks?
151834
If i am not mistaken you just call the function within the script file and pass the parameters as required e.g\n\ninclude file function :\n\nSomefunction(int param1, int param2)\n{\n  //somelogic\n  //return value\n\n}\n\nin html file where you included the above file:\n\n<script>\nfunction newfunction()\n{\n var result = Somefunction(1,2)\n}\n</script>\n\nhope this helps. I haven't tested this yet but it should work
126071
Yup, the only place ASP fails with includes is dynamic ones.\n\nBecause of the run time for the various parts in ASP, the includes get included before any code gets run so you cannot do dynamic includes although there are a few works arounds for this.\n\nBasically ASP uses normal SSI includes and doesnt have its own set.\n\nThe fun bit is you have to get the file locations correct. If you are including a file from an included file you may find that say...\n/default.asp (includes ssi/nav.asp)\n/ssi/nav.asp (includes links.asp)\nand the include path will be subtaly different than including links.asp directly from /default.asp\n\nOne other thing, name your includes as .asp files and not .inc files as this will prevent someone from downloading and gaining access to your code by just downloading the .inc file.\n\n----\n\nOne thing I forgot... You must make sure that if the include file has any asp (vbscript or whatever) code on it, that page must have a .asp suffix as obviously it has to run the code.
52119
Add this inside the <form\nenctype="multipart/form-data"\n\nIt should look like:\n<form METHOD=POST enctype="multipart/form-data">\nHope this works.\nGood Luck
248499
I am not really sure what you want to do with the javascript. But you can enter it either in the html or in a separate file. This site has some basic javascript help.\n\nhttp://www.webdesignfromscratch.com/js101.cfm
616999
Add trhe below lines in your Page's Head Section.\n<SCRIPT LANGUAGE="JavaScript">\n<!--\nfunction f1(){\n   switch (event.keyCode)\n   {\n    case 112 :\n        event.keyCode = 0;\n        event.returnValue = false;  \n        break;\n    }\n}\ndocument.attachEvent("onkeydown", f1);\n//-->\n</SCRIPT>
262433
i would surgest a use of a small java script img at the begining of the script\n\nsome thing like\n<a href="noname.html" onClick="liens=new createArray('noname.html','noname.html'); location=liens[pub]; return false"><img name="pubImg" src="ATT58239.jpg" width="550" height="379" border="0">
674154
Look here:\nhttp://www.free-javascripts.com/
408532
Unfortunately, .NET doesn't have this as a built-in property or method for the DataGridTextBox control.\n\nIf you are working on a Web page, you could access that information client-side via JavaScript's Selected property.
1024794
On the form tag is an action option.  Set this to the destination web site.\nThats it.  No javascript.
638752
Put this in an asp page and try it.I jus did it and it worked. \n\n<%@ Language=VBScript %>\n<HTML>\n<HEAD>\n<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">\n</HEAD>\n<BODY>\n<form name="frmTest" method="post">\n<img src="Bluebar.gif" ></img>\n<br>\n<LABEL id="lblclick" onclick="ShowList()">Click on this</LABEL>\n<P> </P>\n<br>\n<LABEL id="lblShow" ></LABEL>\n</form>\n</BODY>\n</HTML>\n<script language="javascript">\nfunction ShowList()\n  {\n   window.document.getElementById('lblShow').innerHTML = "Hey ! you just viewed and clicked me :)"\n  }\n</script>\n\nDude.....the window.document.getElementById will show as .... I tried all methods and yahoo still sucks...\nSo here I will explain.  getElementBytId() .In this bracket you need to give the Label which is displaying the text, its id , i.e in this case getElementBytId('lblShow'), and after the close parenthesis we give ".innerHTML" and then "=" what value we want to give.\nhave issues still then, send me a mail at nigeljd@gmail.com
355334
http://www.javascriptkit.com
76363
javascript doesnt do that. Bravenet adds addons like it. You'd need a serverside JIT compiler like ASP or PHP with sendmail modules.
1006502
The script \n\n<script type="text/javascript">\nvar famname = new Array(3)\nfamname[0] = "Tom"\nfamname[1] = "Ann"\nfamname[2] = "Sue"\n\nfor (i=0; i<3; i++)\n{\ndocument.write(famname[i] + "<br>")\n}\n</script>\n\nthis will create an array that will only allow 3 elements and will loop and print out the values onscreen of the whole array.\n\nthen 2nd script would more to your use, the array length is not set and can be as long as you wish\n\n<script type="text/javascript">\nvar name = new Array();\nname[0] = "1";\nname[1] = "2";\nname[2] = "3";\nalert('array is :'+name+'&#92;n'+'with first elem : '+name[0]);\n</script> \n\nso an worked example for your problem would be something linke\n\n<script type="text/javascript">\n//declare an array\nvar myArray = new array();\n//your varible\nvar myVar;\n\n//set some items to the array\nmyArray[0] = "Bob";\nmyArray[1] = "Edd";\n\n//get the first element ot the array and assign it to myVar\nMyVar = MyArray[0];\n</script>
960959
You can do this many ways.\nI will show you how to do it using the registry and a simple text file.\n\n1) I assume you have a control on your form that is supposed to save the data when it is clicked, double clicked or whatever.\n\n2) The "save" code will go in the appropriate event (click/double click/mouse over/whatever), the "load" code will go in either the form load event or the "Sub Main" of your startup object.  According to your description you want the data to "auto load" when the application is started.\n\nSAVE CODE Example 1:\n    SaveSetting applicationname, "Settings", "Last Name", txtLastName.Text\n    SaveSetting applicationname, "Settings", "First Name", txtFirstName.Text\n    SaveSetting applicationname, "Settings", "Address", txtAddress.Text\n    SaveSetting applicationname, "Settings", "City", txtCity.Text\n    SaveSetting applicationname, "Settings", "State", txtState.Text\n    SaveSetting applicationname, "Settings", "Zip", txtZip.Text\n\napplicationname is the name of your application (duh)\n"Settings" is a literal that can be anything meaningful that you want...such as;"Form1 Settings", "Address Settings", etc\nThe next parameter ("First Name","Last Name", etc.) is a meaningful name for each "thing" you want to save.\nThe last parameter is the actual data that you are wanting to save.\n\nSAVE CODE Example 2:\ndim intFileNum as integer\nintFileNum = FreeFile\nOpen "Settings.txt" for output as #intFileNum \nprint #intfilenum, txtLastName.Text\nprint #intfilenum, txtFirstName.Text\nprint #intfilenum, txtAddress.Text\nprint #intfilenum, txtCity.Text\nprint #intfilenum, txtState.Text\nprint #intfilenum, txtZip.Text\nClose #intFileNum\n\nThe above code open a text file on your default drive and in a default location, generally where you have saved your application.\nIt then writes data to this file one line at a time, no identifiers or anything, just data followed by carriage return and line feed (vbCRLF).\nThe last line flushes the write buffer and closes the file.\n\n\nREAD CODE Example 1:\n    txtLastName.Text = GetSetting(applicationname, "Settings", "Last Name", "")\n    txtFirstName.Text = GetSetting(applicationname, "Settings", "First Name", "")\n    txtAddress.Text = GetSetting(applicationname, "Settings", "Address", "")\n    txtCity.Text = GetSetting(applicationname, "Settings", "City", "")\n    txtState.Text = GetSetting(applicationname, "Settings", "State", "")\n    txtZip.Text = GetSetting(applicationname, "Settings", "Zip", "")\n\nThis is just the reverse of the SaveSetting, however, the last parameter ("") is a default is the setting cannot be found in the registry.\n\n\nREAD CODE Example 2:\ndim intFileNum as integer\nintFileNum = FreeFile\nOpen "Settings.txt" for input as #intFileNum \ninput #intfilenum, txtLastName.Text\ninput #intfilenum, txtFirstName.Text\ninput #intfilenum, txtAddress.Text\ninput #intfilenum, txtCity.Text\ninput #intfilenum, txtState.Text\ninput #intfilenum, txtZip.Text\nClose #intFileNum
20777
It looks like javascript, the areas / hyperlinks are mapped. I recomend plagerism. Copy the source code & adapt / re-build what works for you.\nGood luck
170270
attach the value in the query string e.g. \n\nwww.ursite.com/urfolder/urfile.htm?urparaname=urvalue
1048973
Eval() isn't going to make a new variable, it's just going to try to parse what you've passed it in the parentheses and spit it out as a string-looking variant value.\n\nI'm not attempting to run it myself right now, but I suspect that, for example, on iteration #1 of your loop, line 2 is interpreted like this:\n\n"var1" = 2\n\n...which would probably either generate an error (because you can't assign a value to a value), or else it would simply evaluate to FALSE (since the value 2 does not equal the value "var1").\n\nI'm not familiar enough with ASP.NET to know if there's a way to do it in that environment, but I feel pretty comfortable saying that you will not be able to have your code *create* actual new variables for you in ASP "classic."\n\nI'd suggest that, if you don't know how many variables you're going to need until runtime, use an array, and the REDIM statement to resize it if neccessary.