No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
9 Posted Topics
Re: Try document.getElementsByTagName("BODY").style.backgroundImage = img; instead. | |
Re: There are a lot of ways to do something like this, but the way I would do it is a bit of JavaScript saying this: [CODE]<a href="welcome.html" id="link">Link text</a> <script type="text/javascript"> document.getElementById("link").innerHTML = myNewString; </script> [/CODE] | |
Re: Either do <form onsubmit="function()"> or <input type="submit" onclick="function">. | |
Re: I am afraid I don't really have time to read it all through, but it seems like you use the [I]var[/I] keyword when declaring variables inside your functions: this makes the variables local. If you instead simple write the variable name and its value, the variable will be added to … | |
Re: Well, I don't know how your validation loop works, but you could add something like [CODE]if(WhatEverYourFOrmVariableIsNames.type == hidden){ don't validate }[/CODE] | |
Re: [CODE]<html> <head> <script type="text/javascript"> function formatText(el, tagstart, tagend){ if (el.setSelectionRange) { el.value = el.value.substring(0,el.selectionStart) + tagstart + el.value.substring(el.selectionStart,el.selectionEnd) + tagend + el.value.substring(el.selectionEnd,el.value.length) }else{ var selectedText = document.selection.createRange().text; if (selectedText != "") { var newText = tagstart + selectedText + tagend; document.selection.createRange().text = newText; } } } </script> </head> <body> <textarea … | |
Re: Hello Muhammad shah, I'm not sure I got you, but I think you asked for a button which would check or uncheck all checkboxes on a webpage? If so, I whipped something together: [CODE] <html> <head> <script type="text/javascript"> function checkall(){ boxes = document.getElementsByTagName("input"); max = boxes.length; i = 0; for(i=0;i<=max;i++){ … | |
Re: Hello jaycastr, A variable declared [I]inside[/I] a JavaScript function will only be [I]local[/I] if you write it like this: [CODE] function func(){ var x = 5; } [/CODE] However, if you don't use the [I]var[/I] keyword, it will be added onto the window element, and thus global: [CODE] function func(){ … | |
I am new to Daniweb, but I have browsed the forum here for a while and it has often solved problems of mine, so now that I encountered a pickle which I cannot seem to solve in a satisfactory way using only googling, I'm asking for some hands on help: … |
The End.