Thursday, 11 March 2010
|
| import/include a .js file into a .js file Henri 09:00:14 |
| | Hi,
Is there a way to include a .js file inside a .js file in JavaScript 1.5?
Thanx
Henri
|
| | 9 answers | Add comment |
Tuesday, 9 March 2010
|
| Swap/restore image while show/hide divs Guest 19:55:34 |
| | 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
|
| | 6 answers | Add comment |
Monday, 8 March 2010
|
| Problem with XmlHttpRequest (0x80040111 / nsIXMLHttpRequest.status) on several configurations Greg 19:38:03 |
| | Hi,
I've designed a bookmark in Ajax / PHP that I will put soon on sourceforge.net. But I've got an very tricky bug. I try it on some computers with Internet Explorer/Windows, Firefox 1.07/Linux, Firefox 1.5/Linux, Firefox 1.5/Windows and Firefox 1.5/Mac, Safari/Mac. It works perfectly on a lot of configurations but, on some PC with Firefox 1.5/Windows (not all), the Javascript code with XmlHttpRequest don't work at all and I've got this message when I refresh the webpage : -------------------------------------------------------------------------------------- "Erreur : [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://someWebServer/BookmarkAjax/js/requestor.js :: anonymous :: line 52" data: no] Fichier source : http://someWebServer/BookmarkAjax/js/requestor.js Ligne : 52" --------------------------------------------------------------------------------------
Here is the source : -------------------------------------------------------------------------------------- "function getReadyStateHandler(req, responseXmlHandler) { // Return an anonymous function that listens to the XMLHttpRequest instance return function () { // If the request's status is "complete" if (req.readyState == 4) {
// Check that a successful server response was received>>> L.52 >>>> if (req.status == 200) {
// Pass the XML payload of the response to the // handler function var debug = document.getElementById("debug"); debug.innerHTML += "<br/>" + req.status + " " + req.statusText;
responseXmlHandler(req.responseXML);
} else { ..." -------------------------------------------------------------------------------------- This piece of source code comes from an IBM's article : http://www-128.ibm.com/developerworks/library/j-ajax1/?ca=dgr-lnxw01Ajax
It's very strange because it is working on some configurations and not at all on others, all based on Firefox 1.5/Windows.... There's a lot of message on the web about this kind of error but I don't find this exactly case ! I would be glad if somebody could help me. (I can give you an access on the web application by email if you wan't to reproduce this bug) Thanks - Greg
|
| | 39 answers | Add comment |
Friday, 22 January 2010
|
| Disabling Browser Navigation + Refresh Button Kapil Jain 09:31:56 |
| | Dear All,
I would like to disable back and forward button + Refresh button. Please help in doing this. I want this because i am displaying data from mysql database and on back and forward button complete logic get failed.
Also i would like disable save as option + copy & select all option. Please urgently help me.
Regards, Kapil.
|
| | 3 answer | Add comment |
Wednesday, 13 January 2010
|
| looking for good javascript unescape encoder Mistral 22:31:07 |
| | 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/
|
| | 33 answer | Add comment |
Tuesday, 12 January 2010
|
Topic awaiting moderation clothing 13:58:25 |
Saturday, 9 January 2010
|
Topic awaiting moderation 351100 03:11:29 |
Thursday, 31 December 2009
|
| window.moveTo "Access is denied" error Dave Hammond 18:54:22 |
| | Hi All,
This one is a bit bizarre. My understanding of "Access is denied" with respect to window.moveTo is that it results from a request which would move a portion of the window off screen.
The window in question is 480 high by 1000 wide. The screen dimensions are 1024x768. The move request is to 10,10, which would put the max right coordinate of the window at 1010 and the max bottom coordinate at 490. Both coordinates are clearly within the accessable area of the screen.
The code works fine on server A, but not on server B. Both servers are identical environments (SuSE Linux, Apache, all the same versions). Not only that, the code works fine using Firefox on either server. Only IE throws the error, and only on server B.
Any comments or suggestions would be greatly appreciated. Thanks, -Dave H.
|
| | 4 answer | Add comment |
Tuesday, 24 November 2009
|
| How to detect browser close event Guest 01:48:04 |
| | Can you help me How to detect browser close event? Thanks
|
| | 2 answer | Add comment |
Wednesday, 18 November 2009
|
| Node Replacement without HTML tags & empty responseXML Anand 12:12:27 |
| | 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
|
| | 7 answers | Add comment |
Monday, 21 September 2009
|
| addchild error in IE Brian D 14:24:22 |
| | I am trying to use AddChild in IE. The script is on a document loaded into an iframe. This works in Firefox but not IE. I receive "Invalid argument" on "objSelect.appendChild(optGroup)"
What gives?!
Thank Brian
form.html <html> <head> </head> <body> <form name="form1"> <table bgcolor="#cccccc" width="100%" cellpadding="3" cellspacing="1" border="0"> <tr bgcolor="#ffffff"> <td width="150" align="left" valign="top"><b>Item Cross Reference:</b><br>(if any)</td> <td align="left" valign="top"> <select name="itemcross" id="itemcross" size="5" STYLE="width: 400px" multiple> <option value="">Select One...</option> </select> </td> </tr> </table> </form> <iframe src="optgroup.html" name="ifrm" id="ifrm" width="100%" height="200" scrolling="yes">Sorry, your browser doesn't support iframes.</iframe> </body> </html>
optgroup.html <html> <head> <script language="JavaScript" type="text/javascript"> function create_optgroup(){ objSelect=window.parent.document.getElementById('itemcross') optGroup = document.createElement('optgroup') optGroup.label = "New Group"
objOption=document.createElement("option") objOption.innerHTML = "Sample1" objOption.value = "sample1"
objSelect.appendChild(optGroup) optGroup.appendChild(objOption) } </script> </head> <body>
<input type="button" value="test" onclick="create_optgroup();"> </form>
</body> </html>
|
| | 1 answer | Add comment |
Thursday, 10 September 2009
|
hip hoplouis vuitton clothing just cavalli clothing burberry jacks lrg jeans prada clothing wholesale2wd 04:11:02 |
| | www.wholesale2wd.com
nike shoes wholesale jordan shoes dunk shoes max shoes af1 shoes blazer shoes D&G shoes ed hardy shoes dsquared shoes gucci shoes LV shoes timberland boots ugg boots,cheap AF tshirt ed hardy tshirt CA tshirt D&G tshirt armani tshirt polo tshirt versace tshirt ed hardy dress ca dress AF vest on sale,wholesale coach sandals burberry sandals fendi sandals D&G sandals lv sandals chanel sandals ugg sandals belle sandas versace sandals prada sandalsand so on.sell NY cap LV cap ed hardy cap CA cap set cap,hot sell ed hardy bikini polo bikini ca bikini AF bikini LV bikini Chanel bikini burberry bikini D&G bikini dior sunglasses chanel sunglasses ed hardy sunglasses CA sunglasses versace sunglasses D&G sunglasses gucci sunglasses and so on,cheap evisu jeans G-Star jeans ed hardy jeans coogi jeans gucci jeans versace jeans D&G jeans diesel jeans bape jeans dsquared jeans AF jeans wholesale,chanel sandals gucci sandals dior sandals burberry sandals juicy sandals D&G sandals fendi sandals D&G belts ed hardy belts versace belts CA belts chanel belts D&G bags burberry bags ed hardy bags chanel bags LV bags miumiu bags jimmy bags have new produce,discount gucci watch LV watch armani watch omerga watch rolex watch rado watch burberry watch KG watch IWC watch AP watch for sale
|
| | Add comment |
Tuesday, 25 August 2009
|
| How to draw a line graph using javascript Srinivas 05:50:30 |
| | Hi all,
I have one requirement.Is there any way to create a line graph using javascript.If it is please send me the sample code.But the thing is it should work in all browsers.
Thanks, Srinivas
|
| | 13 answers | Add comment |
Wednesday, 19 August 2009
|
| detection change of location.hash User 14:05:53 |
| | Hi, A page I have shows a different background colour depending on the hash portion of the url as it is first loaded. For example a link to mysite/mypage#0000FF would result in a page with a blue background. But another link, this one to mysite/mypage#FF0000, would not give me a red background if directed to the window where mypage#0000FF was loaded just one moment ago. This is normally to be expected, because the browser thinks same page, no load event, basta. If I use the search portion, for obvious reasons, that is treated a new page load, even when it is from the cache, but I need the hash here. So how do I detect in mypage the moment when the hash string is changed by a user click event on another page in another window, perhaps even from another domain?
Hope this is clear, thanks for any ideas, Thomas
|
| | 7 answers | Add comment |
Friday, 10 July 2009
|
| document.form.submit() doesn't work for large form fields Alan_atwood 14:33:18 |
| | Hello all. I am having a problem with the submit() method that is driving me nuts. I'm using document.form.submit() with large text fields (approx. 2000 characters) and am getting a "Invalid Syntax" error. If I do the same thing with a text field of under 1500 characters, it works fine.
Is there some size limit here that I don't know about? Haven't been able to find anything so far on this particular problem.
Thanks, Alan
|
| | 3 answer | Add comment |
Thursday, 18 June 2009
|
| how to hide toolbar, menu bar, address bar, other non-essentials. Tim 12:33:35 |
| | 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
|
| | 3 answer | Add comment |
Thursday, 4 June 2009
|
| JavaScript object destructor method ??? Eli 04:35:33 |
| | 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
|
| | 6 answers | Add comment |
Thursday, 26 February 2009
|
| How to invisible scrollbar in select box in mozilla Rajesh 21:44:05 |
| | How to invisible the scrollbar in select box OR Drop down box in mozilla.
<SELECT NAME="list2" id="list2" MULTIPLE SIZE=20 style="width:100px;"> <OPTION VALUE="One">One</OPTION> <OPTION VALUE="Two">Two</OPTION> <OPTION VALUE="Three">Three</OPTION> <OPTION VALUE="Four">Four</OPTION> <OPTION VALUE="Five">Five</OPTION> <OPTION VALUE="Six">Six</OPTION>
</SELECT>
*** Sent via Developersdex http://www.developersdex.com ***
|
| | 2 answer | Add comment |
Tuesday, 10 February 2009
|
| iframe and onmousemove K Roemke 07:19:32 |
| | Hello! After a longer time I want to do some javascript again. Task: set content of an iframe to the origin page if the mouse is not moved
Problem: <iframe onmousemove="resetCounter();return true;" does not work as expected.
-> The function resetCounter set back a counter to eg 100. -> with setTimeOut I can call a function wich counts the counter down => If no mousemove happens the counter will reach zero and I can reload the inital frame with frames["mainFrame"].location.href="firstPage.html"
It works if I say in the body tag of firstPage.html: onMouseMove="parent.resetCounter();" but then I have to modify each html-page, with is shown in my iFrame. That is not very nice.
I tried the dom-concept of eventhandling, but I get always the same problem. If moving over the iframe I can't catch any event.
Target-Browser ist Firefox, it would be enough, if somebody has a hint how I could get Information about the mouse position at an arbitrary point of time, because in this case I could check the mouse movement in the function which is periodically called by setTimeOut
Thanks Karsten
|
| | 2 answer | Add comment |
Wednesday, 22 October 2008
|
| after prompting I got "unspecified error" Guest 18:38:06 |
| | 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!
|
| | 8 answers | Add comment |
Thursday, 21 August 2008
|
| Iframe Problem Lans Redmond 10:53:40 |
| | 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
|
| | 5 answers | Add comment |
Tuesday, 10 June 2008
|
| Is there any way to lock scrollbar? Jkarpago 18:15:54 |
| | Hi: I have a javascript that creates a custom scrollbar for a div in the middle of my page. The problem is that when I scroll in my div it scrolls the div and the scroll of the page so I loose the position i want and exists from my div.
So , what I want is to lock the window scrollbar in the moment I am over my div, so I can scroll my div without any window movement.
Is this possible?
|
| | 5 answers | Add comment |
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 |
| | Add comment |
Saturday, 5 April 2008
|
| right click Prophet 21:41:53 |
| | What is the command to prevent "right clicking"
|
| | 13 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
|
| | 5 answers | Add comment |
|