This javascript creates a table that has a header and side column that
do not move while scrolling through the table. I need to convert this
to vb script. Can anybody help, or do you have code in vb (asp) that
would do the same thing?
I use the following script in order to show/hide a section, and at the same time to change a companion .gif with another:
function doExpand(paraNum,arrowNum){ if (paraNum.style.display=="none"){paraNum.style.display="";arrowNum.src="../../images/arrOn.gif"} else {paraNum.style.display="none";arrowNum.src="../../images/arrOff.gif"} }
and then in the body: <div id="reltpc"><a href="javascript:;" onClick="doExpand(xplan1,ico1)"><img id="ico1" src="../../images/arrOff.gif" alt="" width="10" height="9" border="0"> Show Info</a></div> <div id="xplan" style="display:none" onClick="doExpand(xplan,ico1)"> <p>text here</p> <p>some more text here</p> </div>
Furthermore, two more scripts are used in order to show/hide a section without the image:
function doSection (secNum){ if (secNum.style.display=="none"){secNum.style.display="block"} else{secNum.style.display="none"} }
function noSection (secNum){ if (secNum.style.display=="block"){secNum.style.display="none"} }
and then in the body: <div id="more"><a href="javascript:;" onClick="doSection(dtails1)">More Info</a></div> <div id="dtails1" style="display:none" onClick="noSection(dtails1)"> <p>text here</p> <p>some more text here</p> </div>
All three of them are working good in IE and Ffox, however the second claims to use "gelElementById" instead.
Well, how could it be done? Would you help me please, to get that conversion?
I have some pages with this VBScript code, which obviously does not work in Firefox. How can I convert this to Javascript in order for my web page to work in Firefox ? It basically fills a drop down with a list of dates that a user can select. Code:
Anyone have any tips on a good site with a few pointers on how to convert javascript working on IE to work with NS and Safari. For example, this code doesn't work on Safari but on IE and I have no idea why:
I would like to create a program which converts some letters into different ones.
1) I want 2 text areas (input and output) + "convert" button
2) if I type in the input area the letters "ea" I would like it to be converted into "a", so that If I type "cambrea" and press "submit" the output text will have "cambra".
3) if I type "e " which is (e+space) I want it to be converted into " " which is "space" example: if I type the word "spine " it should be converted into "spin , note that there is a space after "spin ".
4) If I type any vowel before "o" it should render "o", example: gambuo becomes gambo. would this be possible? I'm not very familiar with Javascript even though I can modify it.
var gstAmount = (exGst * (1 / gst)); var gstInc = (exGst + gstAmount)
alert(gstAmount); alert(gstInc);
}
now, the exGst parameter comes from an document.getElemenetById('txtExGst').value in an onclick event.
the problem is this. if 400 is entered at exGst, the gstAmount spits out 40, as it should, but the gstInc spits out 40040...so its treating it like a string rather than a number...
Is it possible to convert hex to an image with Javascript? I want to pass an image through a web service as hex, and need to know if I can extract that on the client side and display it as an image..
For example, I have <span id="convert">1</span> somewhere on my page. Notice the "1", I want to covert "1" into let's say "John" every time the "1" is within a span tag with "convert" as the id. I also want "2" to be converted to "Pete". And "3" to be converted to "Bob".
in my script file , i need call a method of a atl com module(implemented in vc++), which returan an safearray. i don't know how to convert it into array in jscript. i have tried serveral ways to get each item but failed at last.
I can't seem to get this color conversion from hex to rgb to work:
/* note: hexStr should be #rrggbb */ var hexStr = 'bebebe'; var hex = parseInt(hexStr.substring(1), 16); var rcolor = (hex & 0xff0000) >> 16; var gcolor = (hex & 0x00ff00) >> 8; var bcolor = hex & 0x0000ff; return [rcolor]; return [gcolor]; return [bcolor];
Lines 2-10 are a script I found. Looking to write the indiv. rgb values into another line. FYI this whole script draws a multiple text shadows behind text and rotates it.
I've found some routines on the 'net that will convert 7-bit ascii to hex, but I'm interested in converting all valid javascript characters (16-bit unicode) into hex. and with javascript.
I have a string containing whitespaces, for example, "Michael Douglasemail.com". In Javascript, how can I replace the whitespace with underscore? "Michael_Douglasemail.com"
So I have this homework assignment where I need to get my application from switches to using methods to give me the same result. I usually am good in this class, but right now I am completely lost. Here is a piece of the code using switches:
/* Get Type of Math problem from the user */ input = JOptionPane.showInputDialog(null,"Enter the type of Math Problem" + "you would like to solve: " + "Addition = 1 " + "Subtraction = 2 " + "Multiplication = 3 " + "Division = 4 " + "Enter the number of your choice: "); .....
I need to get this same result by using methods. I can use these method signatures: public static int readProblemType(){} public static int getAddProblem(int randomValue1 int randomValue2){} public static int getSubProblem(int randomValue1 int randomValue2){} public static int getMultProblem(int randomValue1 int randomValue2){} public static int getDivProblem(int randomValue1 int randomValue2){} public static int readAnswer(){} Looking at what I need to do, how would I use public static int readProblemType(){} method to read the problem type? Or where should I start?
I am having an issue with converting my decimal to a percentage. Below is my code: (cost * .06) is where the issue is var cost = prompt("What is the cost of your purchase?", "") document.write("Return Value: "+cost,("<br />")); var salestax = cost * .06 document.write("Return Value: "+salestax,("<br />")); var total = cost + salestax document.write(cost + salestax);