Show Hide Navigation Links Based On Server Names
Jul 23, 2005
I was wondering if anyone has any idea how this can be done. I am
trying to show/hide navigation links based on server names or ip
addresses. So if, someone visits a particular url/ip address he/she
sees only a particular set of navigation links. I am sure this can be
done using some kind of Java script or VB script, just not sure how.
I have two servers with different server names and IP addresses. Based
on user's input I need to display the hyperlinks which then directs the
user to other utilities. For this I need to create a script which takes
the user input and show/hide those link based on server name or ip
address.
for example -if the user types in- http://wxyz.com or 166.xx.xx.01 then
only two hyperlinks will be shown but if the user inputs-
http://uvwx.com or 166.xx.xx.02 then we want to show all the
hyperlinks.
View 5 Replies
ADVERTISEMENT
Mar 7, 2011
I've got a PHP while loop spitting out an article title and it's content from a database and I have links to show or hide the content of the article under each title. I tried simply putting using jquery hide/show on the divs, but as you'd expect this will show and hide every div at the same time. I want to show and hide the content of the article selected as you'd expect.s!
View 9 Replies
View Related
Apr 9, 2010
Im using a jQuery script to show/hide a div based based on the selection made via a dropdown.
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
The problem im having is that the value used in the dropdown lists are price values eg 10.00
Consequently jQuery seems to interprit these as css notations, meaning the code doesnt work.
View 4 Replies
View Related
Oct 2, 2009
I am looking for a javascript code to display pdf files/links which are on a server onto a webpage. We are using an Oracle application and a javascript code can be embedded in it.
These pdf files will be generated everyday and going forward we will have almost 300+ files in a year. I tried using <a href="res/folderA/folderB/filename.pdf">Report for 10/01/2009</a> and it works fine. I could create 300+ links but most of the links would be dead since the pdf has not been generated for future dates and I don�t want to show dead links.
Can I show the pdf links/files dynamically? Like show only those files with links which are there on the server? The pdf files will be generated Mon-Fri and the naming convention for the PDF file would be MM-DD-YYYY-filename.pdf. Would it be possible to show the reports grouped by months? Getting the month from the file name and when someone clicks on that month then it shows only those files which have been generated in that month.
I tried using below code to get file names from a folder. It works fine on my local but doesn�t work on the server. But then it�s supposed to show only file names and not links :(
<script type="text/javascript">
var fso = new ActiveXObject("Scripting.FileSystemObject");
var f = fso.GetFolder("res\folderA\folderB");
var fc = new Enumerator(f.files);
[Code]....
Also one more trivial question, I looked at the source code of the application and then saw that images used in that application are being called using href and location is under /res folder, where in the code is this specified? Pointer to that folder? What if I want to show some files/images which are not under /Res folder, where do I specify the location?
View 6 Replies
View Related
Feb 6, 2010
I'm using a simple jQuery show/hide toggle effect for the FAQ on this page:
[URL]
I would like to add Show All / Hide All links to the top and bottom of the page that will show and hide all answers at once.
View 1 Replies
View Related
Oct 11, 2011
how to write a script where when a link is clicked in the left nav column, it will display text in the right main column. So, when you first arrive to the page, nothing will appear in the main portion of the site. Content only appears after clicking on a link. When you click on another link, the previous content is hidden, and the new text is displayed. Here's what I have so far:
HTML
<div class="container">
<div class="nav">
<ul id="menu">
[Code]...
View 4 Replies
View Related
Mar 22, 2011
I am getting to know jquery a little, and I am trying hide and show a div when a link is clicked.I have a page setup that has a flash video in a div on the main page. Then when a link is clicked, a lightbox window opens and plays another video. I am trying to get the video on the main page to hide while the lightbox video is playing. Then when a user closes the lightbox window, the div with the main video on the page is shown and starts playing again.So far I can get this to work with one link. But I cannot get the main video div to hide when a second link is clicked.
View 1 Replies
View Related
Nov 12, 2009
I am trying to finish a script that shows a particular div based on the last 2 chars in the cookie value. I have the cookie part done. how to show hide part.
View 7 Replies
View Related
Aug 21, 2011
I know from scouring the Web that this is a very common Javascript question, but I have a twist on the question which is giving me headaches, and I hope some of the brilliant minds here at DaniWeb can help show me the error of my ways.
Say a user has checked a checkbox when submitting a form. I have a PHP script that records that check in a MySQL record. Later when they visit the page, the PHP script shows the checkbox as being checked. That's all working fine.
Now here's what I'm TRYING to do: Since the checkbox is checked when the page loads, I want a certain div to show up. And when the user UNchecks the checkbox, I want the div to go away. Simple, right?
Here's the Javascript I've placed in the header:
In the CSS, I've styled a div thusly:
And here's what I'm doing in the <body>:
This should show up when you click Yellow Box. And it should go away when you click it again. </div>
When I uncheck the checkbox (first click), nothing happens: the div still shows up.
Then when I re-check the checkbox (second click), the div goes away.
And then when I un-check the checkbox again (third click), the div comes back.
In other words, it's doing the OPPOSITE of what I want.
It seems that when I click the checkbox the first time (to uncheck it), the Javascript pulls an empty value. Only with the second click is it finding a value ('none').
View 3 Replies
View Related
Dec 28, 2009
I have a script I am trying to use to show or hide a div id. It uses a cookie, set on link click, to remember if the div should be displayed or not.
It works, but I'm having two problems:
1) The function only shows/hides the first instance of the div, not all instances.
2) Reloading the page after an initial cookie set causes the div to always initially be displayed regardless of the last cookie value (cookie seems to automatically re-set itself to 'tutor-show').
Here is the code:
You can see it in action here: uomeds{dt}com/cbl/cbl-2.htm
View 1 Replies
View Related
May 6, 2011
I would like to show or hide a header element (e.g. <h3></h3>) based up a div tag that either contains content or not. The content is dynamically added or shown, but the header element isn't, which results in having the header element shown with no content below it many times.
Here's an example:
View 2 Replies
View Related
Oct 17, 2011
I'm basically looking for script that uses hide show functionality. with the addition of save state ability based on a cookie that remembers what item the user last expanded for his/her previous visit.
In other words lets say a user expands a link that has a list of information.
Then the user leaves the page and comes back to the same page. It would be ideal if that page remembers(via cookie) what the user last expanded.
Does ANYONE... know where or can perhaps paste some sample code?
View 2 Replies
View Related
Aug 6, 2009
I have a script to show and hide various divs based on a function & var. The problem I am having is that when ANY of the variables ('hate', 'ok' and 'love') are passed all 3 different feedback forms ('FeedbackHate', 'FeedbackOk' and 'FeedbackLove') appear, not just the one I want.
Here is the JS:
function sitesurveyswitch(emotion) {
var e = emotion;
document.getElementById('site_survey_hate').style.backgroundPosition = '0px 0px';
document.getElementById('site_survey_ok').style.backgroundPosition = '0px 0px';
document.getElementById('site_survey_love').style.backgroundPosition = '0px 0px';
document.getElementById('FeedbackHate').style.display = 'none';
document.getElementById('FeedbackOk').style.display = 'none';
document.getElementById('FeedbackLove').style.display = 'none';
if (e == 'hate')
document.getElementById('site_survey_hate').style.backgroundPosition = '-80px 0px';
document.getElementById('FeedbackHate').style.display = 'block';
if (e == 'ok')
document.getElementById('site_survey_ok').style.backgroundPosition = '-80px 0px';
document.getElementById('FeedbackOk').style.display = 'block';
if (e == 'love')
document.getElementById('site_survey_love').style.backgroundPosition = '-80px 0px';
document.getElementById('FeedbackLove').style.display = 'block';
}
And here is the code related to this function:
<div id="siteSurveyBox">
<span id="site_survey_hate" onclick="sitesurveyswitch('hate');return false;"></span>
<span id="site_survey_ok" onclick="sitesurveyswitch('ok');return false;"></span>
<span id="site_survey_love" onclick="sitesurveyswitch('love');return false;"></span>
</div>
<div id="FeedbackHate" style="display:none; margin-top:-28px;">
FEEDBACK FORM IS HERE
</div>
<div id="FeedbackOk" style="display:none; margin-top:-28px;">
FEEDBACK FORM IS HERE
</div>
<div id="FeedbackLove" style="display:none; margin-top:-28px;">
FEEDBACK FORM IS HERE
</div>
View 2 Replies
View Related
May 22, 2011
I searched before more and more but I can't find those things that exactly I want.
I'm on design a new website, you can see this page: [URL]...in this page I have 3 hidden DIV, and at top of content area I have 3 buttons (About, Karan Group, Contact), please click on those buttons and see action.
I'd write this motions by jquery but it's really really amateur! because I have to define all things like below codes (as working for output):
[Code]...
View 3 Replies
View Related
Jul 20, 2011
I have four links which show a div and when you select another link it closes the current div and shows the new one. I'm trying to add a 'Close' button within the currently open div which obviously will hide the div and allow it to be opened again by selecting a link.
Code:
HTML Code:
My problem is that when the box has been hidden by the close link it will not be shown by the links.
View 2 Replies
View Related
May 29, 2010
I have a simple jQuery code that shows or hides a DIV based on the selected value of a select tag. Currently it looks like this and it's working fine:
if (selected == "0") jQuery("#divPublishDate").show('slow')
I want to add an else so that the if the value is anything other than 0, I want to hide the div. What's the proper syntax in this case? I assume this is the short version of an IF statement without the { }.
View 2 Replies
View Related
Mar 29, 2010
I've got a fixed div that has a fixed tab as a trigger. I'd like to only show the trigger tab when the user scrolls down the page "X" pixels from the top (say like 200px). Can someone point me in the direction of implementing this?
View 4 Replies
View Related
Feb 13, 2010
I have a div that should be hidden on default, but when a certain URL parameter is present, then the div is visible.
[Code]...
View 3 Replies
View Related
Jun 22, 2011
I have a select box where the value must be passed via the form. If the users selects choice B or Choice C then I want a specific div to show. If they choose choice A then I want the div to hide or remain hidden. It should be hidden on page load.
Code:
View 1 Replies
View Related
Jun 22, 2011
Ok so I have a select box where the value must be passed via the form. If the users selects choice B or Choice C then I want a specific div to show. If they choose choice A then I want the div to hide or remain hidden. It should be hidden on page load.
<select name="Event_Type_ID">
<option value="1">Choice A</option>
<option value="2">Choice B</option>
[code]....
View 2 Replies
View Related
Aug 26, 2009
My menu navigation(Home, Hosting Solution, etc..)
1. The submenu links need to be centered in the middle of the div instead of aligned to the left.
2. Can the submenu links have a rounded box appear under them, instead of being underlined links. Like these at the top: [url]
3: The top tab needs to stay gray/active/on when the mouse is moved down to the submenu or when it is the active button.
Here is the link of the site [url]
View 2 Replies
View Related
Jul 20, 2005
I have a form with three radio options. And I have three buttons:
<input type="submit" name="mainform_action" value="Edit Data">
<input type="submit" name="mainform_action" value="View Data">
<input type="submit" name="mainform_action" value="Delete Data">
If the first radio button is selected, I only want all three buttons to be
visible to the user.
If the second radio button is selected, I only want the "Edit Data" and "View
Data" buttons to be visible.
If the third radio button is selected, I only want the "View Data" button to be
visible.
Is it possible to accomplish this in Javascript? In particular, I want to
continue using the "input type=submit" buttons without having to create my own.
View 3 Replies
View Related
Aug 9, 2009
how can I show / hide the content of sub divs based on whether the input is != or = and be able to repeat this.I tried to hide the sub divs using , onclick if bla bla = '' ;document.getElementById('hideme').innerHTML = ''; which works, but once I try to enter a new input, then nothing happens, even if the content of the sub divs is = input.
View 2 Replies
View Related
Apr 26, 2011
The two page sections you see on the page "One Time Gift" or "Monthly Subscription" are normally hidden via a document.write via a body onload. Generally, all of this functions well. But, I want to expand the use a bit here so I want to pass a $_POST value to this page from another page which hides or shows these two sections based on this passed value. So, if the value in "once", I want the div with the id="onetime" to be visible and the other div to be hidden. If the value is "monthly", then the opposite would happen. Now this is supposed to all happen as the page loads because we are just arrivng here from the sending page.
View 9 Replies
View Related
Apr 27, 2010
I have 3 divs that contain radio with labels and beneath each radio button I would like to show/hide a form based on whether the radio is selected or not.
Code idea:
So if the radio1 input is selected this would show form1. Selecting radio2 input would hide any other forms (form1, form3) and show form 2 etc.
View 1 Replies
View Related
Nov 13, 2010
I've tried to find a stright forward script which show/hide specific form fields based on a selected option. I've seen many online but non of them was working with me without the need of some coding or tweeks. Does anyone here have such script?
View 4 Replies
View Related