I am trying to write a script that uses the IF statement to see wether or not a user clicked the back button to come to a page, and then if it's true to not let the page load and kick them back X number of pages (say 4) This is what I have so far:
I knew very little about javascript and I didn't used it before a lot but now I Have a problem that: I want the pages in my website to go only forward and disable going backward.I mean the user can not go back to the previews page in some pages and I've been told that i can do that using javascript but I don't know how or using what.
I want to redirect all pages from one website to another. They will be permanent redirects, but I am looking for a way to make it look cool.
Is it possible (It does not HAVE to be a 301 redirect) that when someone goes to a page on the old website, they automatically go to the new website with a message explaining the transfer, and everything around the message goes grayscale until the user clicks ok...?
I would like to check a web page for updates that is written in JavaScript and requires me to log on with a username and password, then email me a snapshot of the web page or a copy of the web page.
Is there any software out there will let me do this?
Does anyone know of a handy way to disable a user from downloading javascript when they save a page?
Here is my problem. I have javascript that disables right clicks on a page. However the user could just "save" the page to there desktop and remove the function that disables right clicks.
Anyone know of a good work around? I've heard of other complex ways, but I was looking for a simple solution.
I'm not sure what this is called, I think it's remote script execution, but I could be wrong, so bear with me.
I have a call that I make for an adserver:
<script src="http://www...."></script>
That populates the page at that point with some text. When it works, it works great, the text comes back, and everything is good. However, when the remote server does not return right away, or maybe the connection is down, my page hangs on it.
So my question is, is there a way to structure the call on my end so that my page continues loading even if this call doesn't return?
We are downloading a few thousand rows of data for users to choose from and need to speed up the operation. The data is related in four levels. The current design allows the user to select the first level from about 20 choices and then the next level's choices are retrieved from the server. This is taking about 4 seconds. We are required to make it faster.
We need to be able to download all the data once and save it for use any time this particular page is visited. The app is a support app and the page will be used throughout the day. The obvious idea is to cache it in a Java applet but we are not allowed to use applets. The other idea is to embed it in JavaScript arrays but we have tried this and the performance penalty is about the same and will be incurred on other lookups on the page becuase the page reloads for these other lookups (we are using WebLogic netui).
What we need is a cookie that is not submitted unless the page explicitly sends it; that is, some data needs to be downloaded once per session and remain in the browser memory/on the disk throughout the session. It would be nice if we could write to a temp file or access a heap - can we? Any ideas?
Has anyone tried sending web pages containing javascript to another user also using Outlook Express?
Mine don't work on the other end - although I'm not sure if this is because they don't have Javascript enabled in MS Explorer 6. I save the entire HTML file + script into my Stationery folder. Then I select Message/New Message Using [select stationery file]. Should it work? Say I sent this by email:
<html> <head> <script> alert("Hi there!"); </script> </head> <body> <p>Can you see the alert box? Let me know.</p> </body>
I'm attempting to use the javascript 'history.go(-1);' to make a page automatically return to the last page a user visited. At the moment, I can get this to work ONLY if I insert a link into the page.
What I want to happen is, the page autmatically sends the user back to the previous page after a set time. I have this for my JS:
function backtomusic() { window.location = history.go(-1); }
And in the body section of my page I have:
<body onLoad="setTimeout('backtomusic()', 3000)">
When it runs I get an error saying 'undefined' in the browser address bar
I have a page where users can filter a list of links using javascript clicks. The user then clicks a link in that list, views the page and then clicks back on the browser to view the rest of the list but the javascript options they filtered in the list are gone resulting in them having to do it all over again. Is there a solution to this?
Would it work if I store their selections in a cookie each time they click a javascript button and then when they visit a link and click back (to what is presumably now a cached page) will I be able to have javascript that will read the cookie and reset their options again or is the cookie not loaded on a cached page?
Are there any common solutions to this kind of thing?
Okay, so I've just installed a javascript that redirects to any random page from a specified list. The problem with it is, it's in an iframe and works as sort of an advertising area. So on the mainpage where the iframe has been placed, whenever someone uses the back button, it just keep going back in the iframe and choosing random pages. The back button doesn't work on the mainpage and instead is used in the actual iframe.
I'm not sure if this is a problem with the iframe or the script, and I don't think I have the mental capacity to figure it out so I'd really value some help! Oh, and apparently the problem doesn't occur when using Firefox. Code:
I've browsed through past usenet archives, but can't seem to come across quite the javascript I'm looking for. I'm looking for a simple javascript that will display the date as such:
May 17
So basically, just displaying the current month and the current date. But I would also like the ability to backdate by one day, two days, etc.. So the next date might look as such:
May 15
Which would be two days earlier than today's date, but in keeping with the same format.
The following script is supposed to have high categories as radio buttons and mid categories as check boxes. Clicking the radio button is supposed to select all checkboxes under it and submit the form.
RADIO (ID = 0001-1 VALUE="") CHECK (ID=0001-0011) CHECK (ID=0001-0012) RADIO (ID = 0001-2 VALUE="") CHECK (ID=0001-0021) CHECK (ID=0001-0022)
The code appears to be checking and unchecking the correct checkboxes. But when the submit occurs, the buttons that were unchecked become checked again.
function handleHighCatSelect(obj) { var highCatName = obj.name; var highCatNameInMidCat = highCatName.substring(0,5) + "00" + highCatName.substring(5,6); alert(highCatName); var length = document.frm.elements.length; for (var i=0;i<length;i++) { var formObj = document.basicSearchMFSFrm.elements[i]; var currName = formObj.name; var currValue = formObj.value;
Basically, I have a page that I load with 10 input fields. If users have JS enabled I want to hide 5 of these fields so as to reduce clutter. If the user needs these extra fields an "Add" button can be used to display the hidden fields one by one.
Once the fields a filled in the user submits them for validation and if there are any error They can "Go back" to make some changes. The whole process works great in FF & Opera but IE lets me down because if you use the Browser "Back" button the Javavscript gets executed even though it should be loaded out of cache.
I'm having an array dynamically fetched from the database using php, in result, I'm getting a check box, with their corresponding value.
I wanted to make a javascript function so that if I uncheck a checkbox, corresponding value disappears.
Before going to the looping, I was trying to do a simple check - like this -
function checkOtherValues() { if (document.myform.checkmember[0].checked==false) { document.myform.checkvalue[0].value=""; } } I thought this should work, but I'm getting the following error -
document.myform.checkmember.0 is null or not an object For the form, it's set in this way -
In one of my pages, I use javascript (AJAX) to populate one mulitple select field based on user's click event on another control. I noticed that when I navigate back to this page by clicking browser's "Back" button, the changes made to the multiple select is not preserved. (It shows the initial value). While all the other user selections are preserved.
var el = document.createElement("iframe"); el.setAttribute('id', 'ifrm'); document.body.appendChild(el); el.setAttribute('height', 250);
[Code].....
And am putting it between <script type="text/javascript"> and </script> tags in the <body> section of my site. But, it only works in certain areas of the page.
I'm looking to have a lightbox pop up when a user clicks the Back button in their browser rather than just navigating back. The purpose is to ask a question with a Yes/No answer, and if they click No, I allow them to go back. The only thing I've found anything like this is the onUnload event, but that doesn't prevent them from going back. How should this be handled?
This is hard to explain but here's my predicament. I have 2 drop down menus in a form for "Main Category" and "Restaurant Type". My boss wants it so when Restaurant is chosen from the first drop down, the 2nd drop down appears, which is what this code below is already doing.
The problem is if you submit the form, then decide to go back and change your Restaurant type, the drop down for Restaurant Type is missing. You can get it to come back by switching to another main category, then switching back to Restaurant. Code: