I would like to disable the ability of the user hold control and click
and get the dropdown menu. I am ultimately discouraging users from
easily getting a copy of the image. I was able to do this and disable
dragging on all browsers I have tested except Safari (Mac).
Code:
I noticed that in the GoDaddy Account UI that whenever you try and control click it simply opens the link in the same window (only seems to apply to the main navigation menu). I am trying to use a script like that on my site but was not able to locate it in their source code.
I need a script that will redirect to a specific page is the browser is safari version 4. if the browser is NOT safari 4 I want the browser to stay on the current page.
I'm using input hidden control's value in the javascript function.
same code is working fine on all other browser except a specific version of safari(i.e.: MAC OS 10.3.7 and Safari 1.2.4).
problem: control's value is not getting displaying at the first time when the page gets load, although the same piece of code would work if I just refresh the page, strage.
declaration of hidden control: <INPUT id="hSliders" type="hidden" runat="server">
javascript code which is calling the value of hSliders:
alert(document.Form1.hSliders.value)
this alert is showing nothing although it should display string.
i check the view source also control's value is getting populated.
I am using a lightbox script (which dims the page when clicked and shows a pop up image).This script is called upon by the user clicking on an imageButton.I am also trying to close, hide or disable this once it has been clicked on (so it only works once). My code is below:
Should I disable the right click option or not? I have a gallery site, I don't want people to be able to copy the images with the default right click over an image. From a professional looking site point of view I suppose I would be messing with the functionality a bit too much, OR is it OK in this instance to disable the click. I know how to write the code to disable the click, but what I was thinking was maybe it would be better to leave the right click but change the menu options? I'm not sure how to change the menu options ere is a link to the site. [URL]
I have some very strange problem on the Mac (OS-X) with the Safari browser 1.0 (v85). Some information in my form was not filled in... after I turned on debugging and checked the console it displayed some error messages.
The messages displayed were like:
(event handler): value undefined (result of expression trim) is not object. Cannot be called.
I have no idea what this means!!! Does anyone know where to find the solution for this problem? The page works fine on Windows with IE (and probably some more browsers).
The trim function is located in an exteral javascript file which is referenced in the head of the html. Code:
I've got this code that needs to load a .wmv file - the client is adamant about using .wmv files and not Flash files - and the client insists that it use variables for the width and height parameters.I've now got the code working correctly in IE (it's always worked in Firefox) but I've just noticed that it's not working in Safari. I'm sure it's got something to do with the <object> but am not sure how to fix it.I've tried including the safari object code for wmv files and then using an if/else statement to only load the object code for safari but my javascript skills aren't that great.As it stands right now, both Firefox and IE try to load the quicktime object after they load the wmv movie object.
I am working on this page - [URL]. When you click the Filter By buttons it alters the content of the iframe below it. This works fine in ALL browsers. However, when you click the browser "back" button it should return to the previous clicked Filter By button (and therefore the previous clicked iframe content). This works fine in every browser except Safari. In Safari it just returns to the previous full page (for instance, if I was viewing google before I went to my page and clicked the iframe buttons, it returns to google rather than the previous iframes).
I'm fairly new to javascript and I'm having the following issue, on Safari, when the user selects the last radio button (the one that should enable an input field) it does nothing and the input field doesn't get available for typing.
Can I please ask your help, here is the relevant code:[URl]..And here is the attached js file for this document:
Code JavaScript: function activaInput() { document.candidaturaOnline.txtOutro.disabled=false; } function desactivaInput()
Can any tell me javascript code that will control the browser progress bar which is located in the status bar. I want to control that progress bar so that I can notify the user about the completion of file uploading.
Here is what I am currently using for a script: <script> function detectBrowser() { var browser=navigator.appName; var navindex=navigator.userAgent.indexOf('Safari'); if (navindex != -1 || browser=='Safari') {alert("The Apple Safari browser does not calculate correctly.)"} </script> And for this to work when the page loads, I use: <body onload="detectBrowser()";>
Basically, I have received Emails from people stating that my website calculators are off by a factor of 100 for anyone using the Apple Safari browser. Since, my website calculates correctly in Internet Explorer, Netscape, Mozilla Firefox, Opera and Google Chrome, I feel this is an Apple Safari problem. Anyway, the above code seems to work okay, but it generates the pop-up when people are using Google Chrome. Is there any way that the script can be changed so that it only pops up when loading Apple Safari?
I have imported css and link to my page. It works fine for all other browsers except Safari browser. When I am loading the page in Safari4 all the page content loads without style. My CSS hosted in CDN.
I was reading various articles on browser detection with javascript and I know it can be unreliable and unprofessional at times, but I was just playing it to see if I could get something working. What I wanted to do was attach a stylesheet if the browser in safari. With what I remember from the articles I read, isn't there a function that is navigator.appName(); ? I have written it in sorta of pseudo-code below:
I know that there is a .html() jQuery function where I can write html in the head of the document like so, head.html (HTML GOES HERE); but I have heard and form experience that mixing javascript and jQuery function can be dangerous. I would detect if the browser is safari and then link a stylesheet if true?
I am getting differences in the rendering between Safari and Firefox. I've tried to come up with a JS script to sort them out but I am not having much luck. Safari always produces "red", the same as FF or nothing at all (where I substitute 'vendor' for 'userAgent', etc). Here's my little test program to isolate the basic code:
<link href="testcss/ff.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" > window.onload=detectbrowser; function detectbrowser() { var browser_type=navigator.userAgent; alert("the user agent is:" + browser_type); var browser_type=navigator.userAgent.indexOf("AppleWebKit"); if(browser_type != -1) {
<body> <div id="testbox"></div><br /> <ul> <li>Red is for Firefox</li> <li>Green is for Internet Explorer</li> <li>Yellow is for Safari</li> </ul> </body> </html>
What's even odder, Safari won't even execute the ....else part of the if statement when I'm trying to detect using 'userAgent'.
Not what i would like but the client wants the browser re-sized on the site loading/refreshing... Been using the following and it works fine.... apart from in Safari. how i can get it working in Safari, or no chance?
The Yahoo! UI event library goes to extremely great lengths to solve this problem. Their solution is very creative but uses browser sniffing. In Safari 1.3 (and earlier?) the following example follows the link when it should not. Does anyone know of any solutions without browser sniffing?
<p><a id="one" href="http://www.yahoo.com">link cancelled with e.preventDefault()</a(isn't cancelled in Safari 1.3, is cancelled in Safari 2)</p>
Is it possible to disable the browser from refreshing when settings document.location.href
for example here's what i would like to do
if you're at mysite.com you'll click on a link. that link will fire a func that will make the location mysite.com/about however i don't want the browser to refresh. instead i want to write some javascript that will do someother stuff. i know it seems pointless but for the project i am working on it actually make pretty good sense (to me at least LOL).
i don't care about clicking the refresh button or F5 right now. just not having the browser refresh when i change the document.location.
I have a quiz application made in PHP. The quizzes have a time limit, and i display the time left using javascript in a textfield. I always initialize the timer on document load. I also have a page navigation that switch between pages, and i maintain the time value from the last page.
Now the problem is that if the user clicks on back button of the browser and after on forward, the timer gets reinitialized with the start time, and in this way he can cheat. Can you please tell me how can i disable all navigation on my page?
Is there some javascript code I can put on my webpages to prevent visitors at my website from saving a web page to their hard drive, or printing a webpage?
Is there even a way to disable all the menus of their browser?
I am writing a prgram in php.when i click "log out "button ,it redirects to my first page "index.php".(username & password)and then by clicking back button in the browser ,it showing all my previous pages that i visited.I want to disable back button in the browser (javascript should support in all browser) using javascript or php