JavaScript - Need Guidance On How To Do This
Hi Guys,
I noticed a feature on http://zendesk.com and other places around the net, where on zendesk the top horizontal nav bar kind of stays at the top of the screen once you have scrolled down the page a little bit. Please take a look at it. I really would like to learn how to do it, but I haven't got a clue what it would be called. I assume its done in javascript since its using DOM. Can anyone help me with either a name or a good tutorial on how to do it? That would be super! Thanks in advance. Similar TutorialsHi, I'm currently building a website at the moment & I have a feature on the page that I would like to perform a nice slideshow. However, its not just in a single square frame, i've made it nice and complicated for myself that i've kind of got myself in a muddle trying to work out the best way of going about this feature. Below is an image that'll hopefully save me from babbling too much. So as you can see, in photoshop i've used masking on the images to produce the effect. So at the moment, two images are showing...each taking up four of these rectangles. I'd like every 7 seconds lets say, for both images to slide off and two more to replace them. Whats the best way to do this? As i'm wanting to use jquery/javascript for this feature. thanks for any advice. Hello all. I need to use javascript to validate 6 text inputs to make sure data is entered and they are not empty. However, there is a checkbox above this and if the checkbox is checked I need these areas to NOT validate as they become optional at that point. Here is what I have: Code: function validateCheckbox() { if(document.forms["form1"].sales.checked) { if(document.forms["form1"].input1.value.length < 1) { // x return false; } else { return true; } } } The above is if the box is checked to validate the field. I want it to do the opposite. How would you do the above with the If statement referring if the check box is NOT checked? And how could I add more fields to check then just one? I am new to javascript so any help or guidance is appreciated. Hi All, I am working on a page with a webform and a subform. I have two related tables where my main form will populate the one side of the relationship and the subform will be for the many side. I am thinking about using an HTML table to hold my subform fields with javascript to dynamically add rows for additional records. I am having trouble with the design of the form processing script, however as since the index on the parent record does not exist at the time of processing I can't think of a way to populate the link field for the child records. The only thing I can think of is to have my page's onload event create a "blank" record (generating the index and storing it in a hidden field) and then essentially make the proceesing script be an update rather than a create. This of course would involve creating some sort of delete function if the user leaves the page without submiting the form. I am not sure this is the best approach but it is all I can come up with. I am open to any ideas or guidance from the community on either my subform idea or processing script idea and I thank you in advance. Kind regards, Ken Hello, I have a specific need in javascript. Can I be guided in this context if its possible or not??? I am using virtuemart extension in joomla to make an ecommerce website. I will try to explain my requirement with the example. Following is the sample category tree with number. 1.0 .....1.1 ..........1.1.1 ..........1.1.2 .....1.2 ..........1.2.1 ..........1.2.2 .....1.3 ..........1.3.1 ..........1.3.2 2.0 .....2.1 ..........2.1.1 ..........2.1.2 .....2.2 ..........2.2.1 ..........2.2.2 .....2.3 ..........2.3.1 ..........2.3.2 Now I have a drop down main menu as 1.0 and 2.0. I want that when i click on 1.0 all the nodes of 1.0 should be opened and 2.0 should be closed and similarly when i click on 2.0 all its child nodes should be opened and 1.0 should be closed. What happen with most extensions is that at a time only one child is opened. If i click on 1.0 then only 1.1 or 1.2 or 1.3 will remain open at a time. Does this kind of customization can be done or is available in javascript .... I hope i will be helped... Thanks a lot for the time. So on my page I have aspanels that are containing different content. Also I have a nav menu to the left... What I am trying to have happen is when you select a link it fires the serverside and client side scripts (which "seems" to be working) and essentially make the nav menu a "autohide-type" tool bar and then give the iframe more space to display the page. then whenever you hover over the "autohide bar" it will resixe the iframe smaller and the menu larger so you can click and so on... So the problem I am having (I've figured out how to fire both side's codes) is that when I am debugging my breakpoints are saying there is no object... below is the simple js I'm trying to use Code: function autohide() { document.getElementById('hidebar').style.display = "block"; document.getElementById('pan_actframe').style.width = "978px"; } I put the 's in at the suggestion of another colleague but originally had the normal getElementById(hidebar) etc... so what is really wierd is with the 's I get the warning (at my breakpoint regarding hidebar) that "Microsoft JScript runtime error: Object required"... now if i remove the 's to make it "what the proper syntax is" I get that exact same warning thrown at my breakpoint regarding pan_actframe... so building off this I put the 's around the asp object and left the html object as normal syntax... in every case, nothing ever happens. The "hidebar" element that has display:none; never gets rescripted to display. I could handle all of this (i guess) by seperating the serverside and client side rescript, but that will only be a temp fix and this same issue will resurface once I move onto writing my mouseover functions. I hope I am being clear, but let me know what other info is needed Note: the functions are being called, and I know this. The server function re-writes various panels that if it were not firing would not work accordingly, and as for the javascript- I drop right into the debug when it is supposed to fire... the objects just never get hit... below are the begining sections of the objects so you can verify the ID's are correctly being called. Code: <div id="hidebar">.... <asp:Panel ID="pan_actframe" runat="server">... |