HTML - How To Add 2 Paramets For Onfocus And Onblur
Hello everyone, I'm new here.
I have this parameters already set in the code: onblur="if(this.value=='') this.value='search...';" onfocus="if(this.value=='search...') this.value='';" how to add 1 more parameter to each, I dont know coding rules, i need to add this. onblur="_removeclass(this, 'search-term-focus')" onfocus="_addclass(this, 'search-term-focus')" Similar TutorialsHi, First off, I can't post a link to the site. The issue exists on a private intranet. Our boss requested business process diagrams from all departments done in Visio. He then discovered that the diagrams could be 'Save(d) as a Web page' from within Visio. As the webmaster, I was asked to convert all Visio diagrams to .htms, post them to the site and create functionality so if someone clicked one of the figures within the .htm process diagram a small window would pop with a two-cell table. Easy enough...the top cell shows 'Previous << Step # >> Next' with previous/next linked to instructions corresponding to the earlier or later figures on the diagram; the lower cell describes the process step. As you'd expect, clicking previous or next takes you to the respective instructions corresponding to the previous or next step. Getting this working to this point was not a problem...here's the problem: 1) Using 'onclick,' when a user hovers over a figure on the .htm page and clicks, a small window pops. 2) If the user then clicks again on the diagram (not either the previous or next links), then the small instructions window hides itself behind the diagram window. (The only benefit to this is that if the user clicks a different figure from the diagram than the one for the instructions currently shown, the instructions window changes to the instructions of the newly clicked figure.) 3) If I add 'onfocus' to keep the small window on top, the instructions window does not go away, but it also does not change to the new instructions if the user clicks a new figure from the diagram. Without javascript, I'd like for the small instruction window to stay 'Always on top,' and for the content in the small window to change when the user clicks a different figure from the .htm diagram page. Any suggestions? Hi All Background: A Popcorn Hour is a NMT that allows one to view just about any movie file types .. easily on ones TV set. You install a hard drive in the Popcorn, ... then copy over some movie avi's. mkv's, etc ... then play them via the Popcorns "Text Only" menu system. But, I was able to figure out how to use a program called Movie Collector to enter info about ones movies, .. then export html gui menu files over to the Popcorn. Now the user can see the movie cover of each movies, along with a detailed description of the movie, then play it using the remote control. Here's an example of the html menu files that get copied over to the Popcorn Hour: http://www.treasure-cove.net/jukeboxtestdrive and my webpage for showing how it's done... http://www.treasure-cove.net/moviejukebox.htm The Popcorn runs Linux, and can run some basic html as well as some java ... but not much Java Support: http://www.networkedmediatank.com/wi...ascript_on_NMT HTML: http://www.networkedmediatank.com/wi..._Documentation As you can see, it's very limited in what it can do html/java-wise. There are 2 things I'd like to add to "My Lil Movie Jukebox", but haven't been able to figure out, ... and wondered if any other members might know a way to accomplish these changes ... Here's how the menu screen looks on your TV (when a movie is onfocus, it has a very small yellow line around the cover, which is hard to see) and here's how I would like it to look: There are 2 changes I'd like to make: 1. When you use the remote, whichever movie cover is "onfocus", .. it expands out in size (without displacing any of the other covers) 2. Whichever movie cover is onfocus, ... the title of that movie is displayed at the top of the page. (but the page scrolls up ) If any of the forums html/java gurus knows how to accomplish anything close to this, .. I sure would appreciate any help given,... or maybe you know of a link that might be of value... (BTW, ... I'm no programmer that's for sure, just a newb hacker...) Here's something I found on the web that looks like it would work ,... http://host.sonspring.com/hoverbox/ but alas, when I copied it over to the Popcorn, ... no workie Again, thanks way in advance for any help! If I could just make the html menus display a little better, I'd be all set! I just don't have the required brain-power thanks! Allen Hi, I want to change the background color of my textbox on focus and change it back to white on onblur event. Issue: When i change the back ground color for text box on focus it properly changes it. But when i leave the focus from textbox border color for text box is impacted and its changed to white. Please help so that border color for textbox is not impacted only background color should change here is the sample code <code> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <p> <input name="text1" type="text" id="text1" value="textbox 1" onfocus="this.style.background ='#cad5df'" onblur="this.style.background='white'"> </p> <p> <input name="text2" type="text" id="text2" value="textbox 2" onFocus="this.style.background = 'yellow'" onBlur="this.style.background='white'"> </p> </body> </html> </code> |