Can't Get Function To Work In IE
Dec 10, 2011
The code below correctly formats a phone number in a form field. Works in fine in Safari, Chrome, Firefox, but not IE. Any ideas why or how I might correct it so that it works there as well?
Code:
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>
<script type="text/javascript">
$(document).ready(function() {
[code]...
View 1 Replies
ADVERTISEMENT
Jul 1, 2010
I'm using the Google AJAX APIs, but some reason google.load works when run through normal javascript, but if I call the method from my jquery ready function it doesn't work. Code and output is below
page.html
<script type="text/javascript">
loadGoogleStuff();
function loaded() {
console.debug("in loaded function");
}
[Code]...
window.loadFirebugConsole is not a function If I comment out line 3 in code.js, the console debug runs okay, so the ready function is running okay. Even though there's a reference to Firebug, the same error occurs in Safari too. Nothing on the page loads.
View 1 Replies
View Related
Apr 21, 2011
Very simple code, and it won't work...
Code:
<script type="text/javascript">
function Toggler() {
Alert();
[code]....
For some reason, this doesn't work on my page. onClick="Alert();" DOES work, but "Toggler();" doesn't. I know, right?! Further weirdness, the code DOES work if I create a simple HTML page that contains nothing but the code contained above. But when I put it into my existing page, it stops working whenever it's embedded. Alert works, Toggler doesn't.
My page is an index.php file which pulls a pre-established "head.tpl" and "foot.tpl", and slots in the requested content between them. I'm trying to put this code in "head.tpl". This is the only JavaScript I'm using (so far), and other than that it's all HTML, CSS and PHP.
View 1 Replies
View Related
Jan 10, 2011
When using the following code, I press Sign Guestbook button and the alert does not show. The alert is there as a test to see if the function is being called.
<input name="btnSign" type="submit" value="Sign Guestbook" onClick="return checkForm();" />
function checkForm()
{
[code]...
View 5 Replies
View Related
Jul 20, 2005
Why doesn't a onmouseover function work in a function?
(It's prob due to my code being wrong more than anything else!)
I've got the following code (snippet):
<!-- Begin
var image0 = new Image(); image0.src = "blank.jpg";
var image1 = new Image(); image1.src = "map.jpg";
// End -->
function swapTheImages()
{
image0.src=Ƈ.jpg' image1.src=ƈ.jpg' image2.src=ƈ.jpg'
}
When I do an onmouseover and call the function, it doesn't work.
BUT if I put the code in directly - it works!
View 3 Replies
View Related
Feb 2, 2010
I have an action in PHP where, when a user clicks the delete button i want a confirmation box. How does a confirmation box work with a PHP function. Here is the function. <a href="/order/delete/id/<?php echo $o->id?>"><img src="/gfx/trashicon.gif" /></a>
View 6 Replies
View Related
Dec 9, 2010
I have a problem with one simple script, which works in every browser, just not in IE6 and IE7. You can see the script at [uRL] - when you click on the iframe, you should see "clicked at the bottom". But it doesn't work in IE6 and IE7.
View 2 Replies
View Related
Sep 5, 2011
I'm new to JS and I can't get this function to display. [code]...
View 18 Replies
View Related
Jan 11, 2011
I have to make a project,it is at the beginning now,but the function verif does not work.[code]
View 2 Replies
View Related
Mar 25, 2010
Whenever I use onclick in javascript (not with onclick attribute in html) it doesn't work. I've never been able to get it to work... ever! Here is the code I'm using
Code:
el = document.getElementById("foo");
el.onclick = function () { return false; };
Am I doing something wrong?
View 11 Replies
View Related
Jun 20, 2010
I've a problem with this ajax function, the url doesn't actualize. I want to see the hash in url, but with the function it's not possible. Why?The code I use in php is:
Code:
<br><a href="#nosotros" onClick="FAjax('nosotros.php' ,'capaContenedora','','get'); return false"><b>nosotros</b></a>
And the function is:
Code:
function FAjax (url,capa,valores,metodo)
{
var ajax=creaAjax();
var capaContenedora = document.getElementById(capa);
[code]...
View 9 Replies
View Related
Jan 11, 2010
I have this thing I would call with the onLoad(); function, but that does not seem to work well with IE. It's a css-popup that I want to fire when the page loads, this is the code I use (It works well in FF but, ofcourse, not in IE):
Code:
<body onLoad="popup('popUpDiv')"></body>
I've tried this workaround:
Code:
<span onLoad="popup('popUpDiv')"></span> But that doesn't work.
I've tried this:Code:
<script type="text/javascript">
window.onload=popup('popUpDiv');
</script>
Whick doesn't work eighter.I am basically completly new to js so I might have overlooked something that to you would seem basic.
View 3 Replies
View Related
Jun 1, 2011
here is my code it works fine but the print function seems to disapear after the code has ended
<html>
<head>
<title>Book Program</title>
[code]....
View 1 Replies
View Related
Dec 15, 2011
Code:
<script language="JavaScript1.2">
var mul = function Multiply (x, y) {
return (x * y);
[code]...
I was wondering why it can't work?
View 2 Replies
View Related
Nov 23, 2010
What am doing wrong? The script works -- identifies blank fields -- but the second function (change_subject) is ignored.[code]
View 3 Replies
View Related
Jan 18, 2010
I have a very simple webpage which plays music from youtube, only top 2000 records from the Netherlands URL...For that i've made a database with music links from youtube, and it works fine. But i want more quality.Therfore I've made a Push button and link with a function within it.if sombody want to say to me if its bad quality music that my database is updated by push the button or link. (part -->php script)[code]
View 1 Replies
View Related
Nov 28, 2010
We have created this function with loops and arrays Problem is the loops work only when I take out the function when the function is in place, nothing works, it is part of exercise
here is my code
title>Congressional Races</title>
<link href="results.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="votes.js"></script>
<script type="text/javascript">
[Code]...
View 5 Replies
View Related
Jul 23, 2005
I bringing up a list of movies in a separate window where each one has an
"onclick" function which is suppose to call a procedure and pass in the
variables and display the details of the selected record. When I click on a
record nothing happens. Code:
View 2 Replies
View Related
Apr 25, 2006
I have this code in actionscript that calls javascript:
actionscript:
zoom_in = function () {
var tw1:Tween = new Tween(mc_1, "_width", Regular.easeOut,
mc_1._width, 0, 1, false); //OK
var tw2:Tween = new Tween(mc_1, "_height", Regular.easeOut,
mc_1._height, 0, 1, false); //OK
ExternalInterface.call("zoom");
}
javascript:
function zoom()
{
top.resizeTo(1024, 768);
self.moveTo(0,0);
}
Everything works perfectly on Firefox 1.5 but not on IE 6+
in IE the "zoom" function doesn't work, but if I add an alert it DOES work:
function zoom()
{
alert('this works');
top.resizeTo(1024, 768);
self.moveTo(0,0);
}
View 1 Replies
View Related
Jul 20, 2005
Can someone tell me where the problem here is? I can't get the "squared()"
function to work properly...it supposed to put the squared value into the
iframe area....
View 11 Replies
View Related
Jul 20, 2005
function CheckImageBtn(eleName,sortfield)
{
document.forms[0].sortby.value=sortfield;
document.forms[0].txtIsHrefClick.value = 'Y'
var objElem;
objElem=eval("document.all."+eleName);
objElem.focus();
objElem.click();
return true;
}
View 1 Replies
View Related
Jan 2, 2011
I'm sure that "insert.php" works because I've tried the
<form method="POST" target="insert.php">
And it adds to the database through "insert.php". But when I remove the
'method="POST" target="insert.php"'
And replace it with $.ajax() it won't work.
Here's the code:
$(document).ready(function(){
$("#submit_wall").submit(function() {
var message_wall = $('#message_wall').attr('value');
var message_wall = message_wall.replace(/</g, '<');
var message_wall = message_wall.replace(/>/g, '>');
var message_wall = message_wall.replace(/<.*?>/g, '');
var FeedUNum = $('#FeedUNum').attr('value');
var FeedConn = $('#FeedConn').attr('value');
$.ajax({
type: "POST",
url: "insert.php",
data: "FeedUnum="+FeedUNum+"&message_wall="+message_wall+"&FeedConn="+FeedConn,
success: function(){
$("ul#wall").prepend('<li style="display: none;">'+message_wall+'</li>');
$("ul#wall li:first").fadeIn();
}});
return false;
});});
View 1 Replies
View Related
Apr 14, 2010
How can I write something like:
document.getElementById('id').scrollIntoView(false);
with the jquery $ syntax?This won't work:
$("#id").scrollIntoView(false);
View 2 Replies
View Related
Nov 5, 2011
My on() function doesn't work. This is my code:
$(document).ready(function(){
$('button').on('click',function(){});
});
[Code]....
I am using latest jQuery 1.7, and it is loaded correctly.
View 5 Replies
View Related
Oct 4, 2010
My website [URL] works well in Firefox and Safari. But some of the JQuery function doesn't work in IE, e.g., Fancybox.
View 1 Replies
View Related
May 24, 2011
why not worksuccess: function()?
success: function(){
$(this).fadeOut("slow",function(){
$(this).parent().remove();
[code]....
View 9 Replies
View Related