Thursday, 24 April 2008
|
| Published page doesn't behave like it should - javascript Guest 20:40:50 |
| | Hi,
I just published a website from Expression Web and had used javascript so that when your mouse hovers over text the image to the right would change. It works beautifully whenever I preview the page in a browser, and even worked when the site first published. But today, after I updated some pages (not including that one) and published the changes, the pictures do not change anymore when the text is hovered over. Like I said, it still works fine when I preview the page from E.W. but not on the actual site. Any suggestions?
Link: http://www.vacavillebiblechurch.com/about/Staff%20Bios/Overseers.htm |
| Options | Add comment |
Friday, 11 April 2008
|
| Swap/restore image while show/hide divs Guest 18:24:55 |
| | Hi All:
I have a very long page of html that I want to take portions and hide them in divs, then show when a link is clicked. I have the hide show part working when the link is clicked, however I would really like to use linked images instead to do the following:
- When open.gif is clicked, the contents of the div show and open.gif is swapped with close.gif - subsequently, when close.gif is clicked, the div contents get hidden again and open.gig replaces close.gif
The tricky part (for me anyways) is to be able to do the image swap/restore multiple times on the same page. Like I said, the div show/hide function works fine and I kind of managed to get the imgae to swap from open to clode but it wont swap back and I figure if I do it multiple times whe way I wrote it (copied it) there is now way it would work. Here is some sample code:
<HTML> <HEAD> <TITLE>main</TITLE> <script language="JavaScript" type="text/JavaScript"> function openIt(train) { showIt = document.all[train]; if (showIt.style.display == "none") { showIt.style.display = "" } else { showIt.style.display = "none" } var x=1; var pics=new Array('images/open.gif','images/close.gif'); window.document.images.this_one.src=pics[x]; if (x) { x=0; } else { x=1; } } </script> </HEAD> <BODY bgcolor="white"> <a href="#" onclick="Javascript:openIt('list1'); return false;"><img src="images/open.gif" name="this_one" border="0"></a><br> <div id="list1" style="display:none"> This will show/hide list1 when you click the above link </div> <a href="#" onclick="Javascript:openIt('list2'); return false;">click here to toggle</a><br> <div id="list2" style="display:none"> This will show/hide list2 when you click the above link </div> <a href="#" onclick="Javascript:openIt('list3'); return false;">click here to toggle</a><br> <div id="list3" style="display:none"> This will show/hide list3 when you click the above link </div> <a href="#" onclick="Javascript:openIt('list4'); return false;">click here to toggle</a> <div id="list4" style="display:none"> This will show/hide list4 when you click the above link </div> </BODY>
If I can make this happen by swapping link text instead of images thats OK too.
Thanks in advance for your help.
Eric B
|
| Options | 5 answers | Add comment |
Saturday, 29 December 2007
|
| Browser Issue Mux 07:00:25 |
| | Hi,
I have a problem displaying large amount of data on the browser. The size of the data is to the order of 1.9Mb.
and the time taken is about 10 seconds. The file is a tree structure, where the depth of the tree is about 5, and the total nodes are about 3000.
The tree is being constructed using Javascript objects and DOM statements. However the response time is still to the order of abt 10-15 seconds to show the completely rendered page.
Can someone suggest a solution of how to improve the response time. The application is on Oracle Portal.
Regards, Mukta
|
| Options | 5 answers | Add comment |
Friday, 14 December 2007
|
| looking for good javascript unescape encoder Mistral 10:19:42 |
| | Neeed good javascript unescape encoder, to protect javascript code. Some advices? Online tool, or ready javascript only. Any opinions about the Javascript Obfuscator: http://www.javascript-source.com/
|
| Options | 31 answer | Add comment |
Friday, 16 November 2007
|
| Maps Gama Franco 19:53:48 |
| | Hi,
I would like to know if there is a library that provides an API to support map scrolling, like the one available in google maps.
This is, I would like to create a user interface where the user is able
to see a small part of a large map. It can then move the view, thus observing another part of the map. Additionally, I would also like to provide a zoom mechanism.
Thanks in advance.
|
| Options | 4 answer | Add comment |
Wednesday, 3 October 2007
|
| iframe and execCommand Am75 12:21:45 |
| | Hi everybody, I'm developing web pages for content management using iframes, through which users can edit html portions... I found execCommand to apply simple formats (bold, italic...) to text. Is there a command to pass to execCommand for applying a style through a class attribute to the text? Does anyone know where can I find a reference with all the possible commands to execCommand? And also a reference to what is standard and what is not about atrributes and methods of the iframe element in javascript? And, in your opinions, are iframes (used with the designMode property setted on) the best choice for content management? Thanks,
Alessio
|
| Options | 8 answers | Add comment |
Thursday, 20 September 2007
|
| onChange not working in FireFox Guest 07:54:35 |
| | I have the following html code that works with IE but not on FireFox. Can anyone help me to get the correct code?
<div class="middlebox" style="margin-left: 7; width: 155"> <select id="SelectStock" style="position: relative; top: 0px; left: 0px; font-size: 7.5pt; width: 155; background-color: #E8E8E8; border: 1px solid #406090; height: 16" onchange="if (this.value !=-1) document.frames('stockdetailsframe').location='http://www5.poems.com.sg/liveprice/lvslingshot2e/MenuModules/ShowAll/showall.asp?parameter='+this.value+value1" value1="&mktdepth_access=1"> <option value="-1">------ Stock Quotes ------</option> <option value="A16">Allgreen</option> <option value="A17U">Ascendasreit</option> <option value="C61U">CapitaComm</option> <option value="C31">CapitaLand</option> <option value="C38U">CapitaMall</option> <option value="C27">Chart SemiCond</option> <option value="C09">CityDev</option> <option value="C52">ComfortDelGro</option> <option value="F83">Cosco Corp</option> <option value="C76">Creative Tech</option> <option value="D05">DBS Grp</option> <option value="D06">Datacraft</option> <option value="F99">F & N</option> <option value="G13">Gen Intl</option> <option value="H78">HK Land</option> <option value="600">Hyflux</option> <option value="J36">JMH</option> <option value="J37">JSH</option> <option value="C07">Jardine C&C</option> <option value="J09">Jurong Tech</option> <option value="BN4">Keppel Corp</option> <option value="K17">Keppel Land</option> <option value="L26">Labroy Marine</option> <option value="B2F">M1</option> <option value="N03">NOL</option> <option value="N21">Noble Grp</option> <option value="O39">OCBC Bk</option> <option value="O32">Olam</option> <option value="P27">Parkway Hldgs</option> <option value="P05">People's Food</option> <option value="C6L">S I A</option> <option value="S68">SGX</option> <option value="S99">SPC</option> <option value="T39">SPH</option> <option value="S63">ST Engg</option> <option value="U96">Semb Corp Ind</option> <option value="S51">SembMar</option> <option value="S08">SingPost</option> <option value="Z74">SingTel</option> <option value="CC3">Star Hub</option> <option value="T82U">SuntecReit</option> <option value="Y92">Thai Beverage</option> <option value="B2W">Total Access</option> <option value="U11">UOB</option> <option value="U14">UOL</option> <option value="U12">UTAC</option> <option value="V03">Venture Corp</option> <option value="W05">Wing Tai</option> </select> </div> </td> </tr> </table> </div>
<iframe xalign="center" frameborder="no" framespacing="0" marginheight="8" marginwidth="12" name="stockdetailsframe" style="border: 0px solid #000000" src="http://www.tpjcian.net/tan_jun_liang_joshua/notice.html" width="800" height="900"> </iframe> |
| Options | Add comment |
Monday, 18 June 2007
|
| how to hide toolbar, menu bar, address bar, other non-essentials. Tim 11:40:46 |
| | Has anyone found a way to hide the toolbar, address bar, and menu in the current web browser window? I cannot window.open as this method has been defeatured due to security in IE. Works in Firefox within domain though!
I am showing an image and would ideally like to show it full-screen. Thanks! timjowers
|
| Options | 2 answer | Add comment |
|
| after prompting I got "unspecified error" Guest 08:14:15 |
| | I have the following code in the event onbeforeunload
if ( typeof executingPostBack != 'undefined' && !executingPostBack ) event.returnValue = ""Warning: Modified data has not been saved."";
executingPostBack is a global variable.
I have another function for another event trying to access an object as follows:
window.location.href = targetObj.href;
everything is OK, but it raises the "unspecified error" when I click cancel in the popup confirmation window.
anyone gets experience of this ?
thank you very much!
|
| Options | 7 answers | Add comment |
Thursday, 17 May 2007
|
how can i create search on the web-site? milka 06:32:52 |
| | I need to create search on my Web-site using JavaScript. HTML-code for this site is located on one page. The change of the lists of the Web-site is performed using CSS and the attributes "display" and "visibility". The information of these lists is between the tags <div></div>. I use access to the array document.all.tags('div') to open it and show. A user enters a word. And to show the list where this word is situated i should go from one <div> to another one looking at the text between them searching for the coincidence. I wrote the script but it doesn't work. Probably i set a wrong range for the search... Would you please help me to find my mistake or advise another way to create a search? that's my script:
var n=0 var k=0 var ar=new Array() var poisk=false var s="<table style='font-family: Verdana; font-size: 10pt; position: absolute; top: 415px; left: 1100px;'><tr><td>"
function findit(str){
if (str==" ") return false;
for (var i=19; i<158; i++){ range=document.body.createRange();
sn=document.getElementsByTagName('div').item(i); so=0; range.setStart(sn, so);
en=document.getElementsByTagName('div').item(i+1); eo=document.getElementsByTagName('div').item(i+1).Text.length; range.setEnd(en, eo);
poisk=range.findText(str)
if (poisk==true){ k=k+1; ar[k]=i; } }
for (var k=1; k<ar.length; k++) { s=s+'<a href=#k onClick="pokaz(ar[k]);">'+k+'</a>'+" ";} s=s+"</td></tr></table>"
d.write(s)
} |
| Options | Add comment |
Monday, 23 April 2007
|
| AJAX Doug 18:00:14 |
| | Hi, Does anybody have a good deal of knowledge in AJAX? I am trying to learn this new stuff but cannot find a good place to start. Even when i search for that term in Google.
As far as I know, AJAX is nothing new. It is just a combo of technology namely Javascript, CSS, HTML ... combine with server side technology like Servlet or PHP.
Thanks for input. Doug
|
| Options | 17 answers | Add comment |
|
| using javascript in the onchange event Mantrid 16:38:42 |
| | Im trying to get a tick box to tick automatically when the user changes the textfield called comm. my code is below but it doesnt work. Can anyone see why?
function changed(x) { document.getElementById(x).checked; }
<input name="changed" id="ischanged" type="checkbox" value="">
<textarea name="comm[]" rows="2" class="BodyText" style="WIDTH: 99%" onChange="changed(ischanged)"><?php echo stripslashes($comment); ?></textarea>
thanks Ian
|
| Options | 5 answers | Add comment |
Tuesday, 6 February 2007
|
| Re: onclick Tony Wong 13:20:29 |
| | solved. thx.
"tony wong" <x34@netvigator.com> ј¶јg©у¶lҐу·s»D:432eb0e5$1@127.0.0.1... Dear All Please help me whether i am wrong i am a form to submit value to MsSQL, it is in order <input type="submit" name="submitvalue" value="Send SMS"> i wish to refresh the sub-Frame after submission of value, so i use the submit button to refresh. it is in order. <input type="button" value="refresh" onclick="window.parent.mainFrame.location.reload()"> Then i change the "type" to submit but it does not work. <input type="submit" name="submitvalue" value="Send SMS" onclick="window.parent.mainFrame.location.reload()">
|
| Options | 2 answer | Add comment |
Thursday, 11 January 2007
|
| Iframe Problem Lans Redmond 02:13:14 |
| | I have an iframe within a jsp page which displays rows from a database. I then have a checkbox where, when I check/uncheck the checkbox it performs operations on the rows listed in the frame.
I get a jscript "undefined" error if 1 row is returned in the iframe. If I have more that 1 then my length for the iframe shows the amount. if only 1 row is the iframe then my length comes up undefined
|
| Options | 4 answer | Add comment |
Wednesday, 3 January 2007
|
| JavaScript Drop Down Menu DaveO 12:58:57 |
| | Hi All
I have no experience in JavaScript ( only html and ASP ).
I would like to add a Menu ( with multi level drop down sub menu's ) to my web site.
I have tried using a DHTML Menu Creation program, but find that when loaded onto a test site, the menu runs slowly.
The buttons are all gif images and they appear to "re-load" every time the focus changes from 1 menu button to another.
Is there any easy way to create a drop down menu ( either in a horizontal or vertical format ). I do not need boxes / arrows / etc if it will help speed things up.
Any advice would be greatly appreciated.
Regards DaveO
|
| Options | 6 answers | Add comment |
Tuesday, 26 December 2006
|
| for loop David.Jebo@Gmail.Com 16:43:18 |
| | I have written this code and it executes well but I would like to instead of using multiple if statements write a loop that will do the exact same thing. Can anyone help me with writing a loop?
------------ CODE ------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title>
<script language="JavaScript">
<!-- Begin function calculator(user, number){ var a=0; var b=0; var box1 = eval("document.chmod.Matching1") var box2 = eval("document.chmod.Matching2") var box3 = eval("document.chmod.Matching3") var box4 = eval("document.chmod.Matching4") var box5 = eval("document.chmod.Matching5")
if (box1.checked == true){ a +=(document.chmod.textField1.value*1) } if (box2.checked == true){ a +=(document.chmod.textField2.value*1) } if (box3.checked == true){ a +=(document.chmod.textField3.value*1) } if (box4.checked == true){ a +=(document.chmod.textField4.value*1) } if (box5.checked == true){ a +=(document.chmod.textField5.value*1) } else { if (box1.checked == false){ b +=(document.chmod.textField1.value*1) } if (box2.checked == false){ b +=(document.chmod.textField2.value*1) } if (box3.checked == false){ b +=(document.chmod.textField3.value*1) } if (box4.checked == false){ b +=(document.chmod.textField4.value*1) } if (box5.checked == false){ b +=(document.chmod.textField5.value*1) } document.chmod.Matching_Funds.value=a document.chmod.Other_Funds.value=b }
}
</script>
</head>
<body> <form name="chmod"> <table cellpadding="5" width="90%" border="1"> <tr> <td colspan="3"><strong>Funding Sources</strong></td> </tr> <tr> <th align="left" width="40%"> Funding Source Name </th> <th align="left" width="30%"> Matching Funds </th> <th align="left" width="30%"> Fund Amount </th> </tr> <tr> <td><select> <option selected>Select Funding Source</option> <option>Funding Source 1</option> <option>United Way</option> <option>Red Cross</option> </select> </td> <td><input type="checkbox" name="Matching1" value="1"> Yes </td> <td>$ <input type="text" size="10" name="textField1" onBlur="calculator('Matching', 1)"></td> </tr> <tr> <td><select> <option selected>Select Funding Source</option> <option>Funding Source 1</option> <option>United Way</option> <option>Red Cross</option> </select> </td> <td><input type="checkbox" name="Matching2" value="1"> Yes </td> <td>$ <input type="text" size="10" name="textField2" onBlur="calculator('Matching', 1)"></td> </tr> <tr> <td><select> <option selected>Select Funding Source</option> <option>Funding Source 1</option> <option>United Way</option> <option>Red Cross</option> </select> </td> <td><input type="checkbox" name="Matching3" value="1"> Yes </td> <td>$ <input type="text" size="10" name="textField3" onBlur="calculator('Matching', 1)"></td> </tr> <tr> <td><select> <option selected>Select Funding Source</option> <option>Funding Source 1</option> <option>United Way</option> <option>Red Cross</option> </select> </td> <td><input type="checkbox" name="Matching4" value="1"> Yes </td> <td>$ <input type="text" size="10" name="textField4" onBlur="calculator('Matching', 1)"></td> </tr> <tr> <td><select> <option selected>Select Funding Source</option> <option>Funding Source 1</option> <option>United Way</option> <option>Red Cross</option> </select> </td> <td><input type="checkbox" name="Matching5" value="5"> Yes </td> <td>$ <input type="text" size="10" name="textField5" onBlur="calculator('Matching', 1)"></td> </tr> <tr> <td colspan="2"><strong>Matching Funds Total</strong> </td> <td>$ <input name="Matching_Funds" type="text" size="10" tabindex="1"></td> </tr> <tr> <td colspan="2"><strong>Other Funds Total</strong> </td> <td>$ <input type="text" size="10" name="Other_Funds" tabindex="2"></td> </tr> <tr> <td colspan="3"><a href="">Add Additional Funding Sources</a><br> </td> </tr> </table> </form> </body> </html>
|
| Options | 23 answer | Add comment |
Thursday, 14 December 2006
|
| Node Replacement without HTML tags & empty responseXML Anand 21:50:52 |
| | The situation is; I receive a response back from the server which is only a part of html code. e.g. a table like <table> <tr><td>high</td></tr>........ </table>. In other words, I receive a file as a response which has a part of html file.
My aim is to replace an existing document node with the new response.
If I run the following lines (JavaScript):
var parsedText = document.createTextNode(req.responseText); body.replaceChild(parsedText, toReplace)
It replaces the node 'toReplace' with html codes with the tags included which is not what I want. The html tags are not wanted but should display in correct format as specified by html (a tabular form if html tag is <table>)
If I try:
alert(responseXML); (its blank.... nth gets displayed in the alert message) var parsedText = document.createTextNode(req.responseXML); body.replaceChild(parsedText, toReplace); (it replaces toReplace by "[object]" in IE6)
Any kind of help will be appreciated.
Anand
-- Anand ------------------------------------------------------------------------ Anand's Profile: http://www.highdots.com/forums/member.php?userid=72 View this thread: http://www.highdots.com/forums/showthread.php?t=1239469
|
| Options | 5 answers | Add comment |
Wednesday, 6 December 2006
|
| table rows Jean Pierre Daviau 16:55:52 |
| | Hi to every one
for (var j = 0; j < oneTBody.rows.length; j++) { oneTBody.rows[j].height = 300; } Can all the rows be setted in one shot with a propertie similar to this?
oneTBody.rows.height = 300;
Thanks for your attention.
Jean Pierre Daviau -- Easyphp1.8 Apache1.3.24 DEVC++, borland 5.5 windows Xp asus p4 s533/333/133 Intel(R) Celeron (R) CPU 2.00 GHz http://www.jeanpierredaviau.com
|
| Options | 5 answers | Add comment |
Friday, 10 November 2006
|
| IE7 Douglas Crockford 17:13:17 |
| | "There is only one thing standing in the way of realizing the potential of Internet infrastructure: the concerns over trustworthy computing," said plucky Bill Gates in his opening keynote at the RSA Conference in San Francisco. "This is the top priority for Microsoft, and it will remain our top priority," said Gates, ironically.
And so Gates announced that the long dreaded Internet Explorer 7 will ship this summer. Previously it was scheduled to ship with the Longhorn operating system in 2006, but that product seems to be stuck in the muck, and the real immediate costs of insecurity are vast.
As developers, we have greatly benefited from the stability that was realized when Microsoft stopped shipping new browsers. When Microsoft innovates, they pump massive quantities of new bugs into the web. I hope it is different this time, that Microsoft has learned its lessons and will never again ship crap. We shall see.
http://www.crockford.com/javascript
|
| Options | 25 answers | Add comment |
Friday, 20 October 2006
|
| HTML Form question vbMark 13:54:18 |
| | On my form I have a text input box. There are also radio buttons.
I need to take the value of the input box and the value of the selected radio button and concatenate them with a plus sign in between.
So if the input box's value is: "Hello" and the input box's name is name=step1 and the radio button's value is: "David"
I want the output to be:
step1=Hello+David
with the plus sign between them.
How can I do this?
Thanks!
|
| Options | 5 answers | Add comment |
Friday, 6 October 2006
|
Can a reg ex. be embedded within getElementById()? romeogq 11:34:56 |
| | Can a reg ex. be embedded within getElementById()? Can't get it to work.
Something Like: I 'm trying to get all the element id's that do not match the regular expression to disappear. ('i' is looped, color from select statement) document.getElementById("st"+i+"_"+/!$blue/).style.display = "none"; I want the previous line to erase all but the 'blue' div's.
Elements like: (colors are from database) <div id="st1_red">..content..</div> <div id="st2_red">..content..</div> <div id="st3_white">..content..</div> <div id="st4_white">..content..</div> <div id="st5_blue">..content..</div> <div id="st6_blue">..content..</div> <div id="st7_red">..content..</div>
Any help will be appreciated. |
| Options | 2 answer | Add comment |
Wednesday, 13 September 2006
|
| textbox Vagos 00:07:39 |
| | Can someone please, tell me how to check the value of a textbox in a form,
1, the value must be only a positive number ( not 34ax43) , for input a stock number of product 2, the value must be positive komma and two digits max (eg 150,20) , for input price value
Thank you, Vagos Thessaloniki Greece
|
| Options | 6 answers | Add comment |
Friday, 8 September 2006
|
| fso question. Guest 05:41:08 |
| | a simple question.
how can i get the path of the html that on browser now?
i think default fso path is "c:\document~~\usrname\background".
i noticed relative path "." means there always. doesn't care what html file i see which is
in another path like "c:\test".
i want to get the path the current html is in.
|
| Options | 5 answers | Add comment |
Thursday, 24 August 2006
|
| JavaScript object destructor method ??? Eli 19:20:14 |
| | Hi,
Is there any way that I can define a destructor for an object in JavaScript that will be called automatically when object is discarded?
<script type="text/javascript"> MyOBJ.prototype=new Object(); MyOBJ.prototype.constructor=MyOBJ; function MyOBJ() { alert('Constructor!'); } MyOBJ.prototype.destructor=function() { alert('Destructor!'); }
var my_obj=new MyOBJ(); //<-- will show 'Constructor!' delete my_obj; //<-- will show 'Destructor!' </script>
-thanks in advance, Eli
|
| Options | 6 answers | Add comment |
Wednesday, 23 August 2006
|
| javascript submit problem : form won't submit Joop 10:06:28 |
| | Hi all,
I'm kinda new to JavaScript, but hey... I'm trying anyway!
So, here's my problem :
I've created a table in my document, presenting a list of items, one can 'select' by clicking on it... (Kinda like a menu, you make your choice from) But since this table can get very long, I've put something of a 'search-form' on top, which enables the user to make a selection of products from the list.
Now, the form uses a "post" method, and submits to itself, using the form action. Some PHP script will make sure that the form is filled out already, the next time it's presented.
The table, containing a list of products is presented, below the form. When a user clicks on a product, the product should be "selected". At first i just used a <a href="zoeken.php?prod_id=24"> link to do this, but the problem is that my form won't remain in tact.
So now, the global idea is to submit the form after setting a hidden form-field using JavaScript, using a onClick event.
Here's my code :
<-- the script -->
<head> <script language="JavaScript"> <!-- var old_Color;
function select_this(id) { old_Color = document.getElementById(id).style.backgroundColor; document.getElementById(id).style.backgroundColor = '#FFCCCC'; }
function deselect_this(id) { document.getElementById(id).style.backgroundColor = old_Color; }
function submit_this(id) { document.forms['zoeken'].select_id.value = id; document.forms['zoeken'].submit(); } --> </script> </head>
<body>
<-- the form -->
<form name="zoeken" action="zoeken.php" method="post" style="margin: 5px;">
<-- a very long form with a lot of variable goes here -->
<input type="submit" value="Zoeken" class="formulierknop"> <input type="hidden" name="select_id" value="">
</form>
<-- the tablerows, in the table, all look like this -->
<tr id="1" onClick="submit_this(1);" onMouseOver="select_this(1);" onMouseOut="deselect_this(1);" style="cursor: hand; background-color : 'transparent';">
</tr>
Cool huh?!? Everything seems to work, but the submit function. Did I do something terribly wrong?!? I probably did...
WHY WON'T MY FORM SUBMIT WHEN I CLICK ON A TABLE-ROW?!?!?!?!? :-S
Thnx in advance to everyone spending time on this!
|
| Options | 6 answers | Add comment |
|