Here's what I'm trying to do: I need a div to pop-up below a list item with more information (that will basically describe the list item in detail). I also need the div code to be included on the same page- not called from a separate php file.
I've cut out the bulky content and included the styles attached to the elements in the code below (instead of leaving the classes I'm using).
Code:
<ul>
<li><a href="javascript:document.getElementById('1').style.display='inline'">First List Item</a> <br />
[Code].....
This works fantastic in Safari... but for some reason, not in firefox. (these are the only two I've tested). In Firefox, clicking the links opens a blank white page with the sinlge word inline.
Or a more efficient way of accomplishing this task (without a mess of attached .js files),
Im doing an Ajax call which calls a Java struts 2 action. This action basically just does a DB update. There is no data being returned to the client. The page refreshes to a blank white page. I dont want his to happen. I want a pop up box on my page. The ajax call happens when i press a save button. Here is the jquery code:
[Code]...
Im a Jquery newbie. As far as I can gather JQuery is expecting data back. It gets nothing back (which is what I want). But Jquery does a refresh with this. Hence why my page goes to a blank white page. I think this is what is happening
I was thinking of putting in my dummy div and loading the blank/empty no html into the dummy div but there has to be a way to stop the white page showing up. I dont get pop up boxes either as shown in code above:
brighten a page to white when a link is clicked, and then unbrighten to the new page the link sends you to.
Anyone know how to do that?
I want to make the home page be the gateway page, and if you click on any of the links, the home page fades to white really fast/smooth and then the white goes away fast and smooth revealing the link that was clicked.
A website I've been working on has a black bar across the bottom. Under some conditions, however, there is a gap between the bar and the bottom of the page -- white for the body. The conditions vary between browsers and OSes. To keep things simple, I'll describe what happens with my principle development environment -- Chrome under Ubuntu.
The main body of the website is fixed width, centered against a neutral background. If the browser window is narrowed so that a horizontal scrollbar appears, the gap appears.
I have tried various things to find the gap so I can move the bar down or whatever but nothing seems to work. I tried using the document height but I found that it is greater than the actual display area which probably means that it is including something not visible (which is fine) but how do I reliably determine the extra? Or is there another solution I should be looking at (I won't bother listing all that I have tried)?
I am trying to bring arrows for the clue tip which i am using for my web site. Even though i have given "arrows: true" in my js, i am not getting the arrows. Please see below for the code i used and give me
[URL]It loads fine in FF but when opened via IE it loads then switches to a white page. The second time you visit it should load normal unless you clear your cache.Here are the two errors
Quote:
Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729) Timestamp: Mon, 18 Oct 2010 11:21:02 UTC
I want to develop a multi-tab browser plugin, which requires all links in a page could open in new tabs within this multi-tab browser plugin. It's very similar to Multi-Tab functions of Firefox/IE, when opening a page in one tab, then any links in that Tab will open in another new tab(after setup from pref), i want to know this principle(how to implement this). I am thinking try this:$('a').click(...), while i am not sure whether it's good/enough.
Im trying to run javascript on a page, that has a regular frame, and get all the links from the frame. However im not very good at javascript which makes this much harder :cool:This is the script im trying to use:
How can you block some or all links on a website?For example, when a visitor lands on the homepage and see a link to another page on the homepage.. How can you block the link to another page and make a popup appear with links and text...?To elaborate my question, here is an example:visitor come on a homepage of a website..he sees a link to a wonderful article.. when he clicks it, the link is blocked and a popup appears asking him to checkout a free offer and once you enter your email address, the link will become accessible
I've been trying to edit this script but it continues to open my slideshow images into new tabs. I would like that the images on the slideshows when clicked they will open in the same tab. How can I do that? Here is the script I am using
Here is a short tutorial on dynamic-links which use javascript to create the page. Ok to start open up notepad and type
<html><head> <title>My first dynamic link</title> </head><body><script> var name=prompt("Enter name:",""); var age=prompt("Enter age:",""); if (name == "" || age == ""){ document.write("Please reload and fill everything in."); } else { document.write('<a href="javascript:dp='Your name:'+name+'<br>Your age:'+age+''">Click here for dynamic page</a>'); } </script> <noscript><a href="getfirefox.com">Get a decent browser</a></noscript> </body></html>
Ok save it and test it out. I am writing this kinda fast so if it doesn't work pm me or reply to this topic. Ok we will go over what it does now. 1. First it gives you the prompt name then age. It checks whether they are both filled in and if they aren't it says to reload. Otherwise it writes down the link. Next we will go over the link. 2. Here is the infrastructure of the link.
1. The start of most links "<a href="
2. The starting of the string for the browser to connect to " " "
3. The tag that defines a javascript page and its name is dp. "javascript:dp"
4. What the javascript equals " = "
5. Start of the string for the javascript to do " ' "
6. Now it displays the text Your name: "Your name:"
7. It now appends the variable from the script name to it. EG:your name you entered. "'+name+'"
8. It makes a line break and displays the text Your Age: "<br>Your age:"
9. It now appends the variable from the script age to it. EG:your age you entered. " '+age+' "
10. Leaves a blank space " "
11. Starts to end the javascript string by closing the space for text and a semi-colon to end the page. "'"
12. Ends the html string for the link and displays text for the link." ">Click here for dynamic page"
I searched, but couldn't find answers--probably because I'm not sure what this is called... Anyway, I have about 50 web pages and I want to have some JavaScript that will read in a list of keywords, scan the web page and create links on any of those keywords... Is there any way to do this sort of thing?
probably a simple question but I can't for the life of mefigure out how to do this:I have a page that has information on various # anchors, a list ofthem are at the top and once clicked I need the one clicked to becomeunderlined and remain underlined untiled a different # is clicked.How on earth do I do this? I've managed to use jquery toggle to turnon an underline once it is clicked, but i have to click the same linkagain to turn it off, which is not what I want, I need it toautomatically turn off once a different link is clicked
I tried finding a similar situation in the forums, but was unable to discover anything sepcific. I think I may be way off here, and or trying to do something bizarre, but what I am trying to do is change only part of the the url for all of the links on a page. So say I want to change:
href="/something/something/all"
to
href="/something/something/specific"
I think I need to use each() in combination with attr but I am not exactly sure how. This is what I have so far (with no luck):
I've successfully changed part of a single link based of it's enclosing div id, but if there is more than one link in the div, it replaces the entire href of all the other links in that div to be the same as the first one. So that's why I think I need to use each(). But again, I'm not sure how to do this properly in this case.
I'm working on a project where we're using JavaScript to let users swap styles on a page. To accomplish this, I'm calling the script via href="javascript:swapcss()" on the switch styles button.
Some pages on the site have anchor links. On those pages, if someone swaps styles without hitting any of the anchor links, all is well. But if someone hits an anchor link and then hits the swap button (at this point the URL is pageid.html#anchor), the page just reloads to their anhor point without swapping styles.
Does anyone have a workaround handy? I've tried several alternatives I've found online (href="#" onClick="action"; href="javascript void(0)" ). Nothing works for this case yet. Code:
I am working on an internal work site. In the site I have a text box and on entering a specific code I want it to open a new page that links to a document that has the same name. ie. if user types red, I want it to find the document red.html in a folder. To make my colleagues job easier, I want the text box to autocomplete. Below is a section of the code I plan to use:
Code: <script> var arrValues = ["red", "orange", "yellow", "green", "blue", "indigo", "violet", "brown"]; </script></head><body> <h2>Autocomplete Textbox Example</h2> <p>Type in a color in lowercase:<br /> <input type="text" value="" id="txt1" onkeypress="return autocomplete(this, event, arrValues)" /></p> </body> </html>
How to modify this to: 1) Link the text entered to the document I want opened 2) Open this document upon 'enter' pressed
I'm relatively new to jQuery, and I'm trying to figure out how to create a restaurant menu, that when you click on an item on this menu, an image and description will show on the page. [URL]I've looked through several plugins but cannot find this exact solution. Can anyone please point me in the right direction?
all try to explain my problem: i have this website:[URL].. i'm using Jquery Cycle to do a slideshow. I would like to know how to put a link on each colored square.
I know i have to find in "jquery.cycle.all.js" but i'm a bit lost...
I have a page that is on a secure server, lets say https://server.com and I have a link on a page /somelink.html. I am trying to use jQuery to change the link to http://server.com/somelink.html
Here is the code I have come up with: $(document).ready(function() { $("a[href^='https://server.com']") .each(function(){ this.href = this.href.replace(/^https://server.com/,"http://www.server.co"); }); $("a[href^='/']") .each(function(){ this.href = this.href.replace(/^//, "http://www.server.co"); }); });
However, my code only seems to work in Firebug after everything has rendered. I assume that the links are changes when the Document is Ready but before the server address is attached to the links.