I've copied some code from a book which will enable me to make a layer
around a page, my aim is to do something a little more complex but this I
thought would get me started.
Anyway, I've run into a problem before I even start! The script works OK, it
runs the image in from the left hand side quite nicely, great. Problem I
have it always scrolls up to the top of the page, when the link I click
maybe 2 or 3 screens below (does that make sence?). I thought if I was to
add a name attribute to the link I could get the co-ordinates of this and
the screen will not reposition. Code:
All I want to do is to have a div slide down from underneath a button I have. When i search online, I find a zillion slide down menu scripts, but they don't work for just sliding a div.
My pages all have the same blank at start then the images slide up trick. I have an old workaround for IE that stopped working, and I don't know what to do. In IE now nothing shows up.
I'm looking for a particular dhtml content scroller that is will slide to different sections of the content when a link is clicked.
Imagine a long table with all the pages of content on it side by side and a layer is placed over that table so that when a link is clicked the desired content will slide into view.
Its a very common effect used in flash sites but im wondering if anyone knew how to do it using dhtml.
I have a form that will display either text boxes to edit a start and end date or just display nothing depending on the selection from a <select>. I am using JavaScript and DHTML to accomplish this and the code below works fine. When the page loads my <select> will have a value already.
My question is how do I get the correct block of code to show up when the page loads depending on what is already selected? I can't use an onLoad in the body tag because I am unable to edit the body tag. Code:
I've got a good cross browser dhtml fade in script that shows random images from an array when the window loads. It works perfectly for that.
I'd like to alter the code to show when the window loads the 'entire slideshow' over and over in a loop. I'm very new to JavaScript and could use a bit of help or advice on how to implement this. My coding knowledge is very basic. Code:
I'm having a hard time with the use of my DHTML menu and video on my site. The video is served using Windows Media Player. Short of hiding it, I can't seem to get my DHTML menu to appear above the video. Unfortunately, I have noticed that hiding the video caused the browser to flash several times. Does anyone know of anything I can implement that would minimize the client side impact and also allow my menu to appear on top of the video?
I display one of several spans when the user mouses over some code. Inside the span are several tabs. Clicking on the tab triggers a JS function that hides the "current" text for the span, then shows the "new Current" box. It's a constantly revolving door- turn off old, turn on new. Switch from one span to another and reset the fields.
When I switch between different "spans" then switch back, there are ghost form elements on the screen (a text area, a blank button) that appear near where they should be. The section that I was last on does not display. This occurs when switching between different spans. HOWEVER, when I set a javascript alert to display what the old visible and new visible divs are within each span, none of these problems occur- everything displays correctly. It's as if the alerts "reset" the javascript display in some fashion. The errors only happen when the alerts are not on.
Does anyone know why this might happen or if it's a common occurence that these problems disappear when an alert is used? If I don't use an alert, how do you display JS variables during testing. Here are some of my JS functions. Code:
I thought I'd post this and see what you guys think (go easy on me :)). Anyway, my teacher gave the class a project to see if we could make a hangman game with an ActiveX object's draw methods and some good ole' DHTML. I've always wondered why javascript doesn't have any draw methods or graphics objects like Java has.
I suppose SVG will take the place of activeX and Flash... hopefully. Once we had the right object id it was a piece of cake (I found it by the way). Anyway, here's my program. I would've put the code in this post but I have a few includes and graphics that go with it. Best viewed in 1024 x 768 resolution, and IE only (of course).
Using ViewLink behaviors (IE5.5+) and XBL bindings (Gecko-only - NS6+, Mozilla, etc), I basically created an encapsuled widget. That means you can infinitely reuse it with no conflicts.
To implement on a page, you'll need to add this attribute to the <html> tag to make IE happy:
After all of that, to add as many as you want to a page:
<rdhtml:slider width="width in pixels - defaults to 150 if not present" onvaluechange="event to fire when the gripper is moved"></rdhtml:slider>
If I feel the need, I will also implement a "value" attribute which sets the default value of the slider.
Speaking of which, the value property of the element is 0 - 100, reflecting the percentage of the slid amount. And is read/write. :)
(In Mozilla, I implemented a read/write width property as well, and intend to eventually add that in the IE implementation)
You can manipulate the value and position of the gripper by dragging the gripper, clicking on the track (really an hr), or focusing it, and using arrow keys, page up/down, or home/end.
To customize the look, slider.css is applied to every slider.
Required files are: slider.css (styles the sliders) slider.xml (XBL binding for Gecko) slider.htc (ViewLink behavior for IE5.5+)
I've only had it tested in Win2k, XP Home, XP Pro in IE6, and in Win2k and WinXP Pro in a 1.1 trunk Mozilla.
I've been told that it is "sluggish" in IE6, but on my pc it is very smooth. Is it just me where it performs satisfactorily in IE6?
And I'm aware of a weird bug in my implemention of it in Mozilla where clicking on a slider bar sometimes moves the last focused slider instead...
If an IE5 user could confirm that it doesn't work for them, that would be great, and I still need someone in IE5.5 to tell me it works.... Someone with a 1.0 trunk of Mozilla would be much appreciated too. :)
Any ideas for additions would be cool too, though I'm not sure what other attributes I could add that would be useful?
Ok guys l generated some dhtml drop down menu using Sotthink DHTML menu 8.Now l am editing it in my Netbeans but cant change the height of the seperator .
Is DHTML a language? or is it a composition of JavaScript and css? Does Java(not javascript) has something to do in it?
What is actually the best to create client-side dynamic pages? I know JAVA is used to create applets but I am not sure of wich is the most powerful....
Also, wich are the newer versions of all the above languages?
Ok so I'm using FxMenu 4.1.1 on my website at the moment. I figured that I wanted to keep the menu static so it wouldnt ahve to reload everytime someone clicked on page. I made a 3-framed framset with a header,center, and a footer. The center consists of the menu and an iframe. The pages that load from clicked on the menu items load in the iframe. Here's my problem: if I load a flash movie or whatever in the iframe it overlaps the menu. Code:
I picked up a great news ticker script from dynamic drive: http://www.dynamicdrive.com/dynamicindex2/crosstick.htm
But found that it in a mac it has problems when you hit the back button, to return to the page that it was on, it overwrites itself/gets jumbled up. Problem is solved by refreshing the page.
My question is - are dhtml scripts more likely to be a bit buggy in macs? Does anyone have any experience with this particular script and have they found a way around this?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> Back Button Test </title> <script language="JavaScript"> <!-- function createDiv(){ var div = document.createElement('div'); div.innerHTML = TEST DIV' document.body.appendChild(div); } //--> </script> </head> <body> <input type="button" value="Create Div" onclick="createDiv()"> </body> </html>
I using this code sample to create some divs in Firefox and IE6. After going to another site ex:google.com..if I click in the back button the created divs remain in Firefox, like I want, but doesn't in IE... Do you know what's wrong?! Is this an IE6 lack?!
I am designing a free web site for a local organization/business. I found some awesome menus on DHTML central that I and the client love. They go great with the design of the website, as well. My problem? The client wants the links to close when you mouse off of the links. I don't know the coding to make it do that.
Is there a way to change the displayed text on a web page using some combination of Javascript and DHTML? NOT in a text box. As far as I know (with my limited knowledge) the only way you can do this is with a textbox or images, which is not what I'd like to do. There's gotta be a way to do this, right?
I cannot seem to set a size for a text area relative to total screen width in CSS or HTML or Javascript? When I use CSS or a percent value in the cols attribute, they size the textarea as a percentage of another text area on the screen.