Changing the style if the browser is IE - JavaScript Help


So for my website I have one style attribute for a div that changes whether or not the user is using ie or something else
#dropdown { display:inline-block; margin:0px; width:110px; *display: inline; }
the * means it will only work in ie. So that fine, but now i need to be able to do that, change it if its in ie, through javascript.
how would i do that

something like this
document.getElementByID(id).style.XXXXXXXXXXXXXXXX
Posted On: Wednesday 2nd of January 2013 12:39:04 AM Total Views:  240
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




PHP get_file_contents equivalent for Javascript

I have been trying to figure out how to access files on different servers through javascript, as i am converting an onsite myspace app to an iframe app, i need to get the contents of a file from the last.fm api and store it in a variable. Or maybe i could get it with php and store it in a javascript variable if that is possible, any help would be great
VIEWS ON THIS POST

205

Posted on:

Wednesday 21st November 2012
View Replies!

encryption and decryption by aes using ecdh key

hi i need to know how do encryption by aes using ecdh key in java. regards krishna
VIEWS ON THIS POST

249

Posted on:

Wednesday 21st November 2012
View Replies!

swapping divs with java script

Well, if you remember me from before, I was trying to get a code to make a div draggable. That worked. Now however, I'm trying to add some code that will track where the mouse is, and when it reaches a certain set of points, it will affect two divs. It will make one invisible, and the other invisible. They're in the same location, just have different z-indexes. Also, one is initially visible, while the other is invisible. I tried passing parameters (since I want this code to work for several pages), but that doesn't seem to work. I haven't tried making the code specifically for the that one set of divs yet. Well, here it is. //Draging Objects var elementToDrag, deltaX, deltaY //global variables //elementTo Drag - keeps track of what we're dragging //deltaX - //deltaY - function DragObject(which,event){ elementToDrag = document.getElementById(which) //draglayer is being passed //Compute distance to mouse click deltaX = event.clientX - parseInt(elementToDrag.style.left) deltaY = event.clientY - parseInt(elementToDrag.style.top) //clientX & Y represent the current position of the layer //calculates the distacne of the mouse from the layer //Register event handlers -- Determines which browse //top one is a standard code, teh second is for Internet Explorer (both do the same thing) if(document.addEventListener){ //detect the movement of the mouse, call the cuntion, always has to be true document.addEventListener("mousemove",moveHandler,true) document.addEventListener("mouseup",upHandler,true) }else{ document.attachEvent("onmousemove",moveHandler) document.attachEvent("onmouseup",upHandler) } //event is handled, end it -- stop all other events or functions will dragging if(event.stopPropagation){ event.stopPropagation() event.preventDefault() }else{ event.cancelBubble = true //internet explorer function. It does the same as the one above } } function moveHandler(e){ if(!e){ e = window.event //mousemove event } //move element to current mouse position //current mouse position - the offset elementToDrag.style.left = (e.clientX - deltaX) + "px" elementToDrag.style.top = (e.clientY - deltaY) + "px" //event is handled, end it if(e.stopPropagation){ e.stopPropagation() }else{ e.cancelBubble = true } } //Capture mouseup to end drag function upHandler(e){ if(!e){ e = window.event } //Internet Explorer or any other browser if(document.removeEventListener){ document.removeEventListener("mouseup",upHandler,true) document.removeEventListener("mousemove",moveHandler,true) }else{ document.detachEvent("onmouseup",upHandler) document.detachEvent("onmousemove",moveHandler) } if(e.stopPropagation){ e.stopPropagation() }else{ e.cancelBubble = true } } function disAppear(woop, shoop, IE, e, event) { if (IE) { // grab the x-y pos.s if browser is IE tempX = event.clientX + document.body.scrollLeft; tempY = event.clientY + document.body.scrollTop; } else { // grab the x-y pos.s if browser is NS tempX = e.pageX tempY = e.pageY if (tempX > 319 && tempX < 574 && tempY > 200 && tempY
VIEWS ON THIS POST

258

Posted on:

Friday 23rd November 2012
View Replies!

jQuery errorPlacement / error positioning problem

I have finally got around to utilising jQuery form validation on a new site I am doing the coding for and even though everything is working exactly as it should I need to move one of the error messages to display below rather than to the right as the other error messages and even though I have an idea of how it is done I can't get it to work (of course I may be way off). What I have done in the form so far is this  
VIEWS ON THIS POST

258

Posted on:

Saturday 24th November 2012
View Replies!

Document.cookie not working!

, I am new to js and am writing a bookmarklet. For some reason cookies are not working at all. I have tried numerous setCookie, delCookie etc functions and none work, so I am using the simplest form of setting a cookie and it still ceases to work. Here is my code (function(){ // the minimum version of jQuery we want var v = "1.3.2"; // check prior inclusion and version if (window.jQuery === undefined || window.jQuery.fn.jquery < v) { var done = false; var script = document.createElement("script"); script.src = "http://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js"; script.onload = script.onreadystatechange = function(){ if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { done = true; initMyBookmarklet(); } }; document.getElementsByTagName("head")[0].appendChild(script); } else { initMyBookmarklet(); } function initMyBookmarklet() { (window.myBookmarklet = function() { count = 0; $('body').append(""); document.cookie = "asd"+"="+"asd;"; alert(document.cookie); function getSelText() { var SelText = ''; if (window.getSelection) { SelText = window.getSelection(); } else if (document.getSelection) { SelText = document.getSelection(); } else if (document.selection) { SelText = document.selection.createRange().text; } return SelText; } document.onkeydown = function(e) { if (e.keyCode == 27) document.location.reload(true); } document.onclick = function(e) { if (e.altKey) { var text = getSelText(); if (text == "") alert("You must select some text!"); else { $('#notes').append( "Save | Delete" + text + "").hide().fadeIn(2000); $('#note-' + count + '-delete').click(function() { var destroy = confirm("Are you sure you want to delete this note"); if (destroy) { var noteNum = $(this).attr('id').split("-")[1]; $('#note-' + noteNum).remove(); $('#note-' + noteNum + "-buttons").remove(); $('#note-' + noteNum = "-delete").remove(); } }); $('#note-' + count + '-save').click(function() { $('#note-'+$(this).attr('id').split("-")[1]).css("background-color", "green"); }); count++; } } } //alert(getSelText()); })(); } })(); Whats wrong
VIEWS ON THIS POST

100

Posted on:

Saturday 24th November 2012
View Replies!

jQuery LavaLamp script

Hi Iam very begginer I want to use the script named lavaLamp from here http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/cp=all ) but I donn't know how I can use it I try to change the Home tag to the Homea> but it doesnt work please help me With Image Home BBB Travel Ride an elephant
VIEWS ON THIS POST

54

Posted on:

Saturday 24th November 2012
View Replies!

List Items

HI, I am dynamically generating a unordered list. I want to get value("somevalue") inside each item. How can i access it please help me. item1
VIEWS ON THIS POST

253

Posted on:

Saturday 24th November 2012
View Replies!

If LEN = 1 then add a 0 : JS problem

, I am having a Javascript problem and any help would be apprecated. I am trying to test the input for if length = 1 then add on a 0 as this would mean if the user wanted 1.20 if would come out as 1.20 and not 1.2 as it is at the moment. I've tried concatenating the variables together and then putting them back into the variable but it still comes out at 1 decimal place. I am testing this on the form validation page, not the form processing page at current. if(cpence.value.length == 1){ cpence + 0;} Also trying testing it before it adds it to the database, but still no luck. if($pence.value.length == 1){ $pence . "0";} Many
VIEWS ON THIS POST

69

Posted on:

Sunday 25th November 2012
View Replies!

Decrementation Not Working

Please see the comment on code below to see the problem. Sequence: x ^ n -1 var sqn; var pow=1; var pans=1; do { sqn = prompt("Enter Sequence: "); }while(sqn0){ document.write("9 --- "); for (x=1;x
VIEWS ON THIS POST

223

Posted on:

Sunday 25th November 2012
View Replies!

show image of the link on mouse over

: This specific to the messages posted by members for various sections on this forum. when I read through the message text, and if the member has typed in some link of other site, on mouse over of this link i see small image of the link contents. I wanted to know how to do that Are the images stored in the database and shown on mouse over or its something else.
VIEWS ON THIS POST

256

Posted on:

Monday 26th November 2012
View Replies!

jQuery tablesorter and passing checkbox arrays - JavaScript Help

I recently got some help over in the PHP Coding forum to help edit multiple records as selected with checkboxes.Everything works fine as standard but I have thrown another spanner in the works that, as I think it is javascript related, I have not got a clue how to resolve.I have added the tablesorter script which allows me to, well, sort tables! The sorting part works fine but once I have used it, it then will not pass the checkbox values onto the next page/script.The page in question is HERE. It is on a non-production database so it is fine for people to actually test it.If I try to pass the records before sorting anything it works perfectly. However, as soon as I have clicked to sort any column, even one that is already sorted in the right order, it will not pass any checkbox values. However, after sorting, if I try to edit one record, via the pencil icon on the page, it works perfectly.This suggests to me that something happens during the javascript process that stops the values being passed as an array.The link to the script itself is http://autobahn.tabl...tablesorter.js.The code I have used isINITIALISATION CODE $(document).ready(function() { $("#myTable").tablesorter({ headers: { 0: { sorter: false }, 7: { sorter: false } } }); }); THE LISTING AND FORM (memberlist.php) ID USERNAME FIRST NAME LAST NAME EMAIL ACTIVE THE RECEIVING SCRIPT (membermultiupdate.php)if (isset ($_POST['submit'])) { if (is_array ($_POST['membid'])) { $updateIDs = implode(', ', array_filter(array_map('intval', $_POST['membid']))); $query = "SELECT * FROM users WHERE id IN ({$updateIDs})"; $members = mysql_query($query); $count=mysql_num_rows($members); } }Any advice or pointers would be greatfully received
VIEWS ON THIS POST

63

Posted on:

Tuesday 27th November 2012
View Replies!

AJAX innerHTML problem

, I hope someone can clarify the following for me. I have page which replaces the code of a certain
tag with other code (which on itself contains another div). The replacing of the code is done with AJAX. ...

VIEWS ON THIS POST

262

Posted on:

Friday 30th November 2012
View Replies!

Ajax Tree + Dynamic Table

I've got a AJAX Tree Node working with MySQL database. What it does is, Expanding Nodes until there are no Children Nodes in the Database. Now, I am trying to Write a Java Script to Create a Dynamic Table whenever ...
VIEWS ON THIS POST

58

Posted on:

Friday 30th November 2012
View Replies!

Writing JavaScript to HTML page

I want to output some Javascript onto a HTML page. I am trying to put the date that the page was last modified onto the bottom of the HTML page, using the document property 'lastmodified'. Currently my code looks like this: This page was last modified on: document.write(document.lastModified) I want to move this text to the right hand side of the page and I thought I could do that using a span class, however, it seems that this doesn't work. I suspect that I have to use 'getElementById()', if so, could someone explain to me how this works Thank for your help.
VIEWS ON THIS POST

81

Posted on:

Sunday 23rd December 2012
View Replies!

sum in html table using javascript

, I have just created dinamic table. this table is dynamic and its rows dynamically can be increased. but i would like how create SUM function that automatically sums each added row value the above process all are need in client side using javascript please help me Madha.V
VIEWS ON THIS POST

55

Posted on:

Sunday 23rd December 2012
View Replies!

Problem JavaScript Resize webpage in crm 4.0

, i am working in ISV file concerning Microsoft Dynamics CRM 4.0, while i insert this code in the ISV.xml: Something in the javascript section has to be written, anyone can help me with that code i need to resize the page that will open. Thank You.
VIEWS ON THIS POST

57

Posted on:

Sunday 23rd December 2012
View Replies!

Problem with CKEditor being called multiple times via AJAX

all, I know this is a long shot because I am talking specifically about a third party application but I thought what the hell, someone might be able to point me in the right direction. The problem is with CKEditor a WYSIWYG rich text editor. I have already made a similar post to the CKE forums as well. The setup is this: I have a page that has information that corresponds to an organization. The info is pulled from a database. The page defaults to a "read only" and the info is formated and displayed in HTML( etc). When the user presses an edit button an AJAX call is made and the read-only content is replaced with the response. The response contains a form that has all the organization data(again from the database) but this time in inputs and textareas. It is here I replace the regular text area with a rich one: CKEDITOR.replace('textbox') As I understand it this basically attaches a style of "display:none" to the textarea and adds the editor to the DOM.This happens on load. This works fine. After the save button is clicked the info is saved to the database, another AJAX call is made and the read-only view replaces the form. The problem arises if the edit button is clicked again without a page refresh first. I get the form but where the textarea should be I see nothing. Further inspection revels my textarea is there but has a style of diplay:none but this time it has not been replaced by the rich text editor. It's not that any of the styles or anything that was done on the previous edit sticks on the page elements as it is essentially a new page, I'm thinking this has something to do with data being stored in memory, but am not sure. Again I know it's a long shot here but thought it was still worth the post as someone may have some insight into why this is not working and be able to point me in the right direction. Also apologize for how long winded the post was.
VIEWS ON THIS POST

80

Posted on:

Sunday 23rd December 2012
View Replies!

DispatchEvent not really dispatching it to event target?

I was trying a few things with Javascript lately (and I am an absolute newbie here in this technology. ). And decided to do something in Firefox add-ons. So I got the skeleton made in add-on builder. Now what I was trying to do is just send a key press to the currently active target in browser. I came to know know that there were 2 ways to do it. 1. Use dispatchEvent method on currently active element. 2. Use getInterface to get nsIDOMWindowUtils and used sendKeyEvent on it. I tried both of the ways but couldn't see any character added in the textbox (I am focusing a text box by clicking on it then go to menu and click the menu item with my add-on name.). var testaddon = { onload: function() { // initialization code this.initialized = true; this.strings = document.getElementById("testaddon-strings"); }, onMenuItemCommand: function(e) { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); //using nsIDOMWindowUtils and sendKeyEvents does not work... /* var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor). getInterface(Components.interfaces.nsIDOMWindowUtils); utils.sendKeyEvent("keydown", KeyEvent.DOM_VK_I, 0, 0, false); utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_I, 0, 0, false); utils.sendKeyEvent("keyup", KeyEvent.DOM_VK_I, 0, 0, false); */ // Appending value like this does work perfectly! they why not dispatching event //gBrowser.selectedBrowser.contentdocument.activeElement.value = gBrowser.selectedBrowser.contentdocument.activeElement.value+"i"; //This approach also does not append key value in box, but both sendKeyEvent and dispatchEvent are generating events!!! var event = document.createEvent("KeyEvents"); event.initKeyEvent("keypress", true, true, document.defaultView, false, false, true, false, KeyEvent.DOM_VK_I, 0); gBrowser.selectedBrowser.contentdocument.activeElement.dispatchEvent(event); } }, onToolbarButtonCommand: function(e) { // just reuse the function above. you can change this, obviously! testaddon.onMenuItemCommand(e); } }; window.addEventListener("load", function () { testaddon.onload(); }, false); So to verify I also added key event listener on window.document and it showed key press being dispatched! Now I am confused, the event does get dispatched and I am sending that event to currently active element (to check if it was still active I printed active element's info in event listener and it showed active element is textarea). But still it's not updating the text box on which I fired it. Am I missing something here This post has been edited by AmitTheInfinity: 07 March 2011 - 01:33 AM
VIEWS ON THIS POST

68

Posted on:

Sunday 23rd December 2012
View Replies!

Help with Year function

My function firstDayofMonth returns an NaN when i run it can anyone see what i have done wrong Javascript Calanders function firstDayofMonth(year, month) { var daynumber=1; if (year > 1900) for (i=1900; i 1) { for (i=1; i
VIEWS ON THIS POST

124

Posted on:

Sunday 23rd December 2012
View Replies!

Javascript Code Not Working

I just got this code and set it up, Its suppose to show an alert when you have checked more than the specified number of check boxes. It was working at first but then I added a bunch of check boxes and I think I screwed something up while doing that. Could you please help me function KeepCount() { var NewCount = 0 if (document.keno.1.checked) {NewCount = NewCount + 1} if (document.keno.2.checked) {NewCount = NewCount + 1} if (document.keno.3.checked) {NewCount = NewCount + 1} if (document.keno.4.checked) {NewCount = NewCount + 1} if (document.keno.5.checked) {NewCount = NewCount + 1} if (document.keno.6.checked) {NewCount = NewCount + 1} if (document.keno.7.checked) {NewCount = NewCount + 1} if (document.keno.8.checked) {NewCount = NewCount + 1} if (document.keno.9.checked) {NewCount = NewCount + 1} if (document.keno.10.checked) {NewCount = NewCount + 1} if (document.keno.11.checked) {NewCount = NewCount + 1} if (document.keno.12.checked) {NewCount = NewCount + 1} if (document.keno.13.checked) {NewCount = NewCount + 1} if (document.keno.14.checked) {NewCount = NewCount + 1} if (document.keno.15.checked) {NewCount = NewCount + 1} if (document.keno.16.checked) {NewCount = NewCount + 1} if (document.keno.17.checked) {NewCount = NewCount + 1} if (document.keno.18.checked) {NewCount = NewCount + 1} if (document.keno.19.checked) {NewCount = NewCount + 1} if (document.keno.20.checked) {NewCount = NewCount + 1} if (document.keno.21.checked) {NewCount = NewCount + 1} if (document.keno.22.checked) {NewCount = NewCount + 1} if (document.keno.23.checked) {NewCount = NewCount + 1} if (document.keno.24.checked) {NewCount = NewCount + 1} if (document.keno.25.checked) {NewCount = NewCount + 1} if (document.keno.26.checked) {NewCount = NewCount + 1} if (document.keno.27.checked) {NewCount = NewCount + 1} if (document.keno.28.checked) {NewCount = NewCount + 1} if (document.keno.29.checked) {NewCount = NewCount + 1} if (document.keno.30.checked) {NewCount = NewCount + 1} if (document.keno.31.checked) {NewCount = NewCount + 1} if (document.keno.32.checked) {NewCount = NewCount + 1} if (document.keno.33.checked) {NewCount = NewCount + 1} if (document.keno.34.checked) {NewCount = NewCount + 1} if (document.keno.35.checked) {NewCount = NewCount + 1} if (document.keno.36.checked) {NewCount = NewCount + 1} if (document.keno.37.checked) {NewCount = NewCount + 1} if (document.keno.38.checked) {NewCount = NewCount + 1} if (document.keno.39.checked) {NewCount = NewCount + 1} if (document.keno.40.checked) {NewCount = NewCount + 1} if (document.keno.41.checked) {NewCount = NewCount + 1} if (document.keno.42.checked) {NewCount = NewCount + 1} if (document.keno.43.checked) {NewCount = NewCount + 1} if (document.keno.44.checked) {NewCount = NewCount + 1} if (document.keno.45.checked) {NewCount = NewCount + 1} if (document.keno.46.checked) {NewCount = NewCount + 1} if (document.keno.47.checked) {NewCount = NewCount + 1} if (document.keno.48.checked) {NewCount = NewCount + 1} if (document.keno.49.checked) {NewCount = NewCount + 1} if (document.keno.50.checked) {NewCount = NewCount + 1} if (document.keno.51.checked) {NewCount = NewCount + 1} if (document.keno.52.checked) {NewCount = NewCount + 1} if (document.keno.53.checked) {NewCount = NewCount + 1} if (document.keno.54.checked) {NewCount = NewCount + 1} if (document.keno.55.checked) {NewCount = NewCount + 1} if (document.keno.56.checked) {NewCount = NewCount + 1} if (document.keno.57.checked) {NewCount = NewCount + 1} if (document.keno.58.checked) {NewCount = NewCount + 1} if (document.keno.59.checked) {NewCount = NewCount + 1} if (document.keno.60.checked) {NewCount = NewCount + 1} if (document.keno.61.checked) {NewCount = NewCount + 1} if (document.keno.62.checked) {NewCount = NewCount + 1} if (document.keno.63.checked) {NewCount = NewCount + 1} if (document.keno.64.checked) {NewCount = NewCount + 1} if (document.keno.65.checked) {NewCount = NewCount + 1} if (document.keno.66.checked) {NewCount = NewCount + 1} if (document.keno.67.checked) {NewCount = NewCount + 1} if (document.keno.68.checked) {NewCount = NewCount + 1} if (document.keno.69.checked) {NewCount = NewCount + 1} if (document.keno.70.checked) {NewCount = NewCount + 1} if (document.keno.71.checked) {NewCount = NewCount + 1} if (document.keno.72.checked) {NewCount = NewCount + 1} if (document.keno.73.checked) {NewCount = NewCount + 1} if (document.keno.74.checked) {NewCount = NewCount + 1} if (document.keno.75.checked) {NewCount = NewCount + 1} if (document.keno.76.checked) {NewCount = NewCount + 1} if (document.keno.77.checked) {NewCount = NewCount + 1} if (document.keno.78.checked) {NewCount = NewCount + 1} if (document.keno.79.checked) {NewCount = NewCount + 1} if (document.keno.80.checked) {NewCount = NewCount + 1} if (document.keno.81.checked) {NewCount = NewCount + 1} if (document.keno.82.checked) {NewCount = NewCount + 1} if (document.keno.83.checked) {NewCount = NewCount + 1} if (document.keno.84.checked) {NewCount = NewCount + 1} if (document.keno.85.checked) {NewCount = NewCount + 1} if (document.keno.86.checked) {NewCount = NewCount + 1} if (document.keno.87.checked) {NewCount = NewCount + 1} if (document.keno.88.checked) {NewCount = NewCount + 1} if (document.keno.89.checked) {NewCount = NewCount + 1} if (document.keno.90.checked) {NewCount = NewCount + 1} if (document.keno.91.checked) {NewCount = NewCount + 1} if (document.keno.92.checked) {NewCount = NewCount + 1} if (document.keno.93.checked) {NewCount = NewCount + 1} if (document.keno.94.checked) {NewCount = NewCount + 1} if (document.keno.95.checked) {NewCount = NewCount + 1} if (document.keno.96.checked) {NewCount = NewCount + 1} if (document.keno.97.checked) {NewCount = NewCount + 1} if (document.keno.98.checked) {NewCount = NewCount + 1} if (document.keno.99.checked) {NewCount = NewCount + 1} if (document.keno.100.checked) {NewCount = NewCount + 1} if (NewCount == 10) { alert('Pick Just 10 Please') document.keno; return false; } } Keno: Select 10 numbers. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 , oops sorry just saw java and assumed they were the same my bad
VIEWS ON THIS POST

59

Posted on:

Sunday 23rd December 2012
View Replies!

.class errors

I am studying from a textbook and this is my first experience with javascript. I have tested that java runs in my browser. but I get this error message when trying to run javascript on a page Java Plug-in 1.6.0_21 Using JRE version 1.6.0_21-b07 Java HotSpot Client VM User home directory = C:\Users\steve ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message l: dump classloader list m: print memory usage o: trigger logging q: hide console r: reload policy configuration s: dump system and deployment properties t: dump thread list v: dump thread stack x: clear classloader cache 0-5: set trace level to ---------------------------------------------------- load: class CreditRoll.class not found. java.lang.ClassNotFoundException: CreditRoll.class at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab/CreditRoll/class.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 9 more Exception: java.lang.ClassNotFoundException: CreditRoll.class Attached is a copy of the CreditRoll.class
VIEWS ON THIS POST

69

Posted on:

Sunday 23rd December 2012
View Replies!

I need to know what this functionality is called.

I need to know what this functionality is called: When you have a group of drop-down lists and with each selection the next list narrows the results - like narrowing down categories of things. The list items are pulled from a MySQL database via PHP. I need to know what to call this so I can read up on it on the interblag.
VIEWS ON THIS POST

49

Posted on:

Sunday 23rd December 2012
View Replies!

help with alt ctrl del

hi, i'm trying to make code that disables ctrl alt del because my brother keeps locking my pc i tried to google it but this is all i got and it's not working. any help is greatly appreciated. ty function disableKeys(e) { var ev=(!e)window.event:e;//IE:Moz if(ev.keyCode==8) { return false; } if((ev.altKey==true)&&(ev.keyCode>=65) && (ev.keyCode
VIEWS ON THIS POST

96

Posted on:

Sunday 23rd December 2012
View Replies!

commission calculation

i want to develope a program using java.......that have many interface... first interface ................... 1)top-welcome! 2)center-image 3)bottom-continue button second interface ................ (layout-grid) 1)top-instruction 2)center ask user to enter: -user name -id (no database just to play pay slip) 3)bottom-2 button -ok(to the next interface) -back(to the previous interface) third interface .................... 1)top-instruction 2)center ask user to enter -sales -basic salary 3)bottom 2 button -ok-continue -back-back to the previous page .......count....... if sales
VIEWS ON THIS POST

35

Posted on:

Sunday 23rd December 2012
View Replies!

How to convert first letter in a sentence to uppercase

I need to convert the first letter in a random generated sentence to uppercase. In other words, I am generating 20 sentences and the first letter in each sentence should start with uppercase. Right now what I am doing is converting the first word to uppercase, but I just one the first letter in the sentence. Example: This is how two sentences appear right now " ONE dog ran on the town. SOME town ran under any car. " and I need for them to behave like this " One dog ran on the town. Some town ran under any car. "
VIEWS ON THIS POST

92

Posted on:

Sunday 23rd December 2012
View Replies!

Chicago-area ExtJS users

Hi , I'm starting an ExtJS user group in the NW Chicago suburbs, and I wanted to invite to our first meeting on Friday June 12. We'll be meeting at the College of Lake County, room T232 at 7:00pm. For our first meeting, we plan on discussing the recent ExtJS Conference, as well as unit testing. Other ideas for topics are certainly welcome! For more information, check out our website: www.chicagoajaxdevelopers.com Hopefully I'll see some of you there. Let me know if you have any questions.
VIEWS ON THIS POST

47

Posted on:

Monday 24th December 2012
View Replies!

change output with menu choice selection

I have not been able to get this output change when the drop down menu choice changes. I have looked at numerous examples but I can't find one that has this simple output change. What am I missing -------------------------------------------------------------------------------------------------------- Javascript /*lgt blue background with the drop down menu to drive textual decode for chosen*/ choice1 choice2 choice3 /*decode for various cases for choice. This is the section I need help with. I want the text to change when a chnge is made from the drop down menu*/ var choice = name(); option value=choice.getname(); switch (option value) { case choice1: document.write(" choice1 you have selected number 1 "); break; case choice2: document.write("number 2 is choice for you"); break; case choice3: document.write("your choice is 3"); break; case 0: document.write("please make a selection"); break; default: document.write("I'm really looking forward to this weekend!"); } This post has been edited by jade 11: 29 April 2009 - 12:17 PM
VIEWS ON THIS POST

85

Posted on:

Monday 24th December 2012
View Replies!

htmlfile: Unknown Runtime Error

, I'm getting this error in my js only for IE (works as expected with firefox): htmlfile: Unknown Runtime Error does anyone know how to fix this for IE. xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState==4) { document.getElementById("list1").innerHTML = xmlHttp.responseText; //alert(xmlHttp.responseText); } } The error happens when I put the response text in the select tag whose id is list1. the response text looks like Test
VIEWS ON THIS POST

38

Posted on:

Monday 24th December 2012
View Replies!

Floating Window Codes

, I am so glad I found you ! So here is my problem: I built this Flash site(first one) for a photographer. Now I have thumbnails/button that open to a new browser window with the corresponding photo gallery. Now, my client wants the window to be menubarless, no scrollbar, basically only have the frame with her name on it. I see it all the time but I am having a real hard time finding the right way to do it... Right now, I have her galleries on regular browser window. First, should I add some Actionscript or Javascript to the button so the link would open onto the floating window. Do I have to add something to the galleries's HTML script and where on it Can you help me with the codes and all If so, THANK YOU SO MUCH!! I have been pulling my hair out over this for the last few weeks. Let me know if you need more details, Marianne , okay, im sorry i misunderstood your question when i read it the first time, or i didnt realize it had to be a flash button. im not a flash master, might want to move this to the flash forum and get one of them in here. but in the meantime, try adding the first bit of code i gave you to the html file on which the flash is placed, in the header. then, in the actions on the button add java script:popUp('filename.html') with filename.html being the full url of the gallery, im not sure if the javascript from the html page will carryover into the html, thats a question for the flash gurus, but its worth a shot. sorry. hope they help you out .
VIEWS ON THIS POST

103

Posted on:

Monday 24th December 2012
View Replies!

Javascript/flash Developer Contest

Contest: Create a Flash/Javascript rich media advertisment that best demonstrates your creative and programming abilities. Speicifcations: 1. Each ad must accept at least two parameters. - pictureURL - linkURL 2. Each ad must be displayed from a single .js file and executed from a single function call passing in all parameters. As a result, every element of the ad (, , etc...) must be dynamicaly created through javascript taking browser requirements/restrictions into consideration. Example: http://www.castads.c...st/pagepeel.htm 1st place: $500 2nd place: $200 3rd place: $200 Visit http://www.castads.com/contest for further information
VIEWS ON THIS POST

75

Posted on:

Monday 24th December 2012
View Replies!

JQuery slideToggle - JavaScript Help

I have a funcytion which get the height of the div and I want this function to be running while the slidToggle effect is taking place, anyone have any ideas If I run it before it looks gittery, if I run with the callback function it looks jittery. This is the function taken out of the function and running at the callback. So ideally it should be a smooth transition with the div sliding down and the height of another div adjusting. $('.accordionHeader').click(function() { $(this).toggleClass('accordionHeaderActive'); $(this).next().slideToggle('slow', function(){ contentHeight = $(".content").outerHeight(); height = (contentHeight-500); //$("#adjuster").animate({"height" : height},"fast"); $("#adjuster").css('height', height); }); return false; }).next().hide();
VIEWS ON THIS POST

269

Posted on:

Friday 28th December 2012
View Replies!

stop propagation jquery - JavaScript Help

I have this code, but when I clone an element, then the action is also cloned. What i want is just individual actions for each element.You can see the problem in demo $(document).ready(function() { $('.edit').editable('http://save.php', { indicator : 'Saving...', submit : 'OK', cancel : 'Cancelar', }); }); $(document).ready(function () { $('#btnAdd').live('click', function(){ var num = $('.clonedInput').length; var newNum = new Number(num + 1); var newElem = $('#input' + num).clone(true).prop('id', 'input' + newNum); newElem.children(':text').prop('name', "myformdata[job][]").prop('job', 'job').val(''); $('#input' + num).after(newElem); $('#btnDel').prop('disabled', ''); if (newNum == 4) $('#btnAdd').prop('disabled', 'disabled'); }); $('#btnDel').live('click', function(){ var num = $('.clonedInput').length; $('#input' + num).remove(); $('#btnAdd').prop('disabled', ''); if (num - 1 == 1) $('#btnDel').prop('disabled', 'disabled'); }); $('#btnDel').prop('disabled', 'disabled'); }); job
VIEWS ON THIS POST

64

Posted on:

Friday 28th December 2012
View Replies!

MOVED: good books on jquery? - JavaScript Help

This topic has been moved to Miscellaneous.http://www.phpfreaks.com/forums/index.phptopic=343577.0
VIEWS ON THIS POST

126

Posted on:

Friday 28th December 2012
View Replies!

jQuery .attr Error - JavaScript Help

I have a function that grabs the title from a li and split what ever the title up that is seperated by a '|' function RemoveFunction(data) { var get = $(data).attr("class"); var getitem = $(data).closest("li"); var cat = $(getitem).attr("title"); console.log($(cat)); var cats = cat.split('|'); This just returns blank on console, but yetconsole.log($(getitem).attr("title"));Outputs correctly in console :sAny ideas
VIEWS ON THIS POST

87

Posted on:

Friday 28th December 2012
View Replies!

building a url from explode function and getting page title to make new url? - JavaScript Help

As i see it this should be an easy one.. Im using the addthis shareing script to share a page url on multiple platforms... My problem is that i have sef urls and also a seperate fast search page where profiles are called up via search. These profiles are called in an iframe and the url is then notadd sef any longer but the standard url... What i need to do is build the sef url from the server request uri and then add the page title which is also the profiles name to the new url---i can do everything to build the url, but i do not know how to pull the page title one thing to note is that the page being shared is in an Iframe, i dont think this is a big problem as the script to share is also on the page which appears in the iframe..here is the addthis shareing script which calls to the url: addthis_pub = \'davidp13\'; '; }here is an example of the url and the result i need for the sef url equivalent: current link no sefhttp://www.xxxxxxxxx...ile&profileid=1Sef result needed to fill the [URL] above:http://www.xxxxxx.co...nersname/1.htmlthe "1" is the profile owners profile id i can pull this from the url above, the viewprofile is a standard word in the url, but the profile owners name is by default also the PAGETITLE.which doesn't show in the non sef link..any ideas how to pull the pagetitle and add it to the new url before it is passedbest regardsAntony
VIEWS ON THIS POST

124

Posted on:

Friday 28th December 2012
View Replies!

Form element dynamic changes - JavaScript Help

. Total rookie in JScript here. I've a form, here are three of the elements: Type: Object 1 Object 2 Object 3
VIEWS ON THIS POST

95

Posted on:

Friday 28th December 2012
View Replies!

Going to a specific table row - JavaScript Help

does jquery have a way to go to a specific table rowI already have the row id and simply want to return to the same position in the table in the event I have to reload the table
VIEWS ON THIS POST

253

Posted on:

Friday 28th December 2012
View Replies!

function won't pass value - JavaScript Help

I have a JS value but it won't put the value in the brackets when i try to get the element by ID instead it is looking for the id named the same as the variable name.Here is what i got to explain better:function fill_div(v) { document.getElementById(v).innerHTML=""; } var x = 0; var y = 3; var area = 1; window.onload = fill_div(area+':'+x+':'+y);It ends up looking for id v instead of id 1:0:3.Any idea how i correct this
VIEWS ON THIS POST

49

Posted on:

Monday 31st December 2012
View Replies!

expand a certain div while hiding another div - JavaScript Help

hi . how do you expand or maximize a certain div while sort of hiding another div (in this case, a control panel) all in one click of a button or link :-\
VIEWS ON THIS POST

145

Posted on:

Monday 31st December 2012
View Replies!

Form not validating - JavaScript Help

HiI have a form that I want to validate the List box so if it is set to the default value (blank) when "send" is clicked, I don't want the form to go to my asp page which sends the email, I want it to show the error message then stop. So far, my form does show the error message, but then carries on and calls the asp page. My php code is below: New Street Request
VIEWS ON THIS POST

62

Posted on:

Monday 31st December 2012
View Replies!

THink this is right place? - JavaScript Help

Basically i want to call a javascript document (or 2) into my document and im not sure why this isnt working Bum Wars - Where you bum can fight for you. everything below that is php
VIEWS ON THIS POST

26

Posted on:

Tuesday 1st January 2013
View Replies!

setInterval() clearInterval(): Getting frustrated. - JavaScript Help

So i'm trying to make a play/pause toggle button for a slideshow gallery I'm making right. When turned on the slideshow should perfoerm the function goForward() every 5000ms. I can successfully start the interval but when trying to clear it all it seems to do is start the interval again and create a new set of intervals so my images start scrolling twice as fast.LINKSAUS: http://www.lojiki.com/slider/$("#play-pause-button").click(function(){ if(timer == null){ var timer = setInterval(goForward, 5000); $("#play-pause-button").html("").load(function(){ $("#play-pause-button").val("on"); }); return false; }; if(timer != null){ clearInterval(goForward); var timer = null; $("#play-pause-button").html("").load(function(){ $("#play-pause-button").val("off"); }); }; });
VIEWS ON THIS POST

65

Posted on:

Tuesday 1st January 2013
View Replies!

Confirm delete of a record - JavaScript Help

Hi Can anyone help with the following I want to add a popup message to confirm the deleting of a record What code do I need to add to this
VIEWS ON THIS POST

70

Posted on:

Tuesday 1st January 2013
View Replies!

dynamically change text based on dropdown selection - JavaScript Help

hai i am new to javascript so please try to bare with me.i have a code which does the job of changing the value show at the bottom of select box dynamically. but the thing is it should actually need to change between only two values only so how can i change the script to do thatmyarr=new Array()myarr[401] = "Local path "myarr[403] = "URL or Local path "myarr[404] = "URL or Local path "myarr[405] = "URL or Local path "myarr[406] = "URL or Local path "myarr[407] = "URL or Local path "myarr[408] = "URL or Local path "myarr[409] = "URL or Local path "myarr[410] = "URL or Local path "myarr[411] = "URL or Local path "myarr[412] = "URL or Local path "myarr[413] = "URL or Local path "myarr[414] = "URL or Local path "myarr[415] = "URL or Local path "myarr[500] = "URL or Local path "myarr[501] = "URL or Local path "myarr[502] = "URL or Local path "myarr[503] = "URL or Local path "myarr[504] = "URL or Local path "myarr[505] = "URL or Local path "function doIt(objval){document.getElementById("msg").firstChild.nodeValue=myarr[objval];} 401 Authorization Required 403 Forbidden 404 Not Found 405 Method Not owed 406 Not Acceptable (encoding) 407 Proxy Authentication Required 408 Request Timed Out 409 Conflicting Request 410 Gone 411 Content Length Required 412 Precondition Failed 413 Request Entity Too Long 414 Request URI Too Long 415 Unsupported Media Type 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not SupportedLocal path
VIEWS ON THIS POST

237

Posted on:

Wednesday 2nd January 2013
View Replies!

Jquery Link handler - JavaScript Help

hey , it's been a while since I asked a question on here but this has me a little stumped.. I believe that this incorporates jquery or base javascript but I am not certain.. What I am trying to figure out, mainly simply for learning purposes, is how websites like facebook and twitter handle their top nav bar links onclick. What I mean by this is when you click on say home or profile, you are taken to the new page without a refresh of the page. Now I know several methods to do this using jquery, but none of them actually take you to the new page, replace the URL, title, etc.. I'm sure it's some kind of DOM manipulation but I am not quite sure as to the method to use for this.. I have attempted several different methods and can achieve close to the results, but not exact.. just wanted to pick your brains on this one a little..
VIEWS ON THIS POST

57

Posted on:

Wednesday 2nd January 2013
View Replies!

problem in loop - JS - JavaScript Help

hii have many pieces of code like: dojo.query("body").delegate("#input0 > select.estatistica", "onchange", function(evt){ dojo.xhrPost({ url: "drop2.php", handleAs: "json", postData: "data=" + $(this).val(), preventCache: true, load: function(json) { $m0 = []; for (var i = 1; i < 10; i++) { $m0.push(parseFloat(json[i]["valor" + i])); } dojo.addonload(refreshChar0); } }); }); dojo.query("body").delegate("#input1 > select.estatistica", "onchange", function(evt){ dojo.xhrPost({ url: "drop2.php", handleAs: "json", postData: "data=" + $(this).val(), preventCache: true, load: function(json) { $m1 = []; for (var i = 1; i < 10; i++) { $m1.push(parseFloat(json[i]["valor" + i])); } dojo.addonload(refreshChart1); } }); }); i tried this loop, but i am not sure about the script. Probably i have syntax errors. Correct for(x=0; x
VIEWS ON THIS POST

71

Posted on:

Wednesday 2nd January 2013
View Replies!

JQuery portion of script no working - JavaScript Help

I have a script that is supposed to submit my form using process.php and deliver a success or failure message on the form page. The form does submit, but the JQuery portion is working. I just get a generic message from my process.php page that the form was submitted. I am not sure what is amiss, so was hoping someone might have some suggestions.Here is the JQuery code. var J = jQuery.noConflict(); J(document).ready(function() { //if submit button is clicked J('#submit').click(function () { //Get the data from all the fields var name = J('input[name=name]'); var email = J('input[name=email]'); var website = J('input[name=website]'); var comment = J('textarea[name=comment]'); //Simple validation to make sure user entered something //If error found, add hightlight class to the text field if (name.val()=='') { name.addClass('hightlight'); return false; } else name.removeClass('hightlight'); if (email.val()=='') { email.addClass('hightlight'); return false; } else email.removeClass('hightlight'); if (comment.val()=='') { comment.addClass('hightlight'); return false; } else comment.removeClass('hightlight'); //organize the data properly var data = 'name=' + name.val() + '&email=' + email.val() + '&website=' + website.val() + '&comment=' + encodeURIComponent(comment.val()); //disabled all the text fields J('.text').attr('disabled','true'); //show the loading sign J('.loading').show(); //start the ajax J.ajax({ //this is the php file that processes the data and send mail url: "process.php", //GET method is used type: "GET", //pass the data data: data, //Do not cache the page cache: false, //success success: function (html) { //if process.php returned 1/true (send mail success) if (html==1) { //hide the form J('.form').fadeOut('slow'); //show the success message J('.done').fadeIn('slow'); //if process.php returned 0/false (send mail failed) } else alert('Sorry, unexpected error. Please try again later.'); } }); //cancel the submit button default behaviours return false; }); }); the form code... Name E-mail Website (example: http://www.yourwebsite.com) Message (resize the textarea if needed) and the process.php code Name' . $name . ' Email' . $email . ' Website' . $website . ' Comment' . nl2br($comment) . ' '; //send the mail $result = sendmail($to, $subject, $message, $from); //if POST was used, display the message straight away if ($_POST) { if ($result) echo 'Thank you! I have received your message.'; else echo 'Sorry, unexpected error. Please try again later'; //else if GET was used, return the boolean value so that //ajax script can react accordingly //1 means success, 0 means failed } else { echo $result; } //if the errors array has values } else { //display the errors message for ($i=0; $i again, the form submits fine, so there is no problem there, but the JQuery is being bypassed.
VIEWS ON THIS POST

47

Posted on:

Wednesday 2nd January 2013
View Replies!

check if the image is clicked - JavaScript Help

if this image is clicked:
VIEWS ON THIS POST

50

Posted on:

Wednesday 2nd January 2013
View Replies!

Complicated problem - JavaScript Help

I have a javascript page included with in a div on a second page. The 1 page has this code: If i navigate directly to the first page i get " world" but if i navigate to the page with the div the includes the first page I get nothing. Does the div preclude the script from running On the second page, if i view source I don't see the above js code. Is there a way to make it work
VIEWS ON THIS POST

60

Posted on:

Wednesday 2nd January 2013
View Replies!

Canvas Re-Draw For Animation - JavaScript Help

HiHere is the updated code. Here you can see the bird is re-drawn by clearing the rectangle, so that it animates the bird moving.The issue i have now is when the bird is cleared it also clears anything else in the scene where the bird currently is. So if you see $.renderScene() draws 3 trees...how can I re-draw the bird without it effecting the trees Because I have to keep re-drawing the trees as well so it looks like the trees flicker when the bird flies near them...not sure how to stop this so the trees stay on the screen while the bird moves...if i dont clear the canvas the bird will duplicate all over the scene $(document).ready ( function() { // global vars var trees = new Array(); var canvas = null; var bird = null; var birdX = 0; var birdY = 0; var posX = 2; var posY = 4; /* function: renderScene desc: renders the trees and any other objects onto the canvas - clears the canvas first to avoid animation render repeating */ $.renderScene = function() { // draw 3 trees trees[0] = new Image(); trees[1] = new Image(); trees[2] = new Image(); trees[0].onload = function() { canvas.drawImage ( trees[0], 0, 0 ); } trees[1].onload = function() { canvas.drawImage ( trees[1], 700, 10); } trees[2].onload = function() { canvas.drawImage ( trees[2], 350, 100); } trees[0].src = 'tree.png'; trees[1].src = 'tree.png'; trees[2].src = 'tree.png'; } /* function: drawBird desc: draws an animated bird */ $.drawBird = function() { // create bird image object bird = new Image(); // create onload event handler to make sure the bird // image loads - prevents crashing or halting // - this is only called once the bird src is set bird.onload = function() { // clear the canvas canvas.clearRect( birdX - 10, birdY - 10, 90,90 ); // draw the bird on our canvas canvas.drawImage ( bird, birdX, birdY ); if ( birdX + posX > 1024 || birdX + posX < 0 ) { posX = -posX; } if ( birdY + posY > 768 || birdY + posY < 0 ) { posY = -posY; } birdX += posX; birdY += posY; $('#pos').html ( 'X:' + birdX + 'Y:' + birdY ); } // load the actual bird image bird.src = "bird.png"; // Render the trees on top of the bird so the bird goes // behind $.renderScene(); } /* function: init desc: initialise the canvas and interval for bird movement */ $.init = function() { // get reference to the canvas element canvas = $('#canvas')[0].getContext ( '2d' ); // set interval to the drawBird function as 10 milliseconds return setInterval ( $.drawBird, 10 ); } // initialise $.init(); });
VIEWS ON THIS POST

66

Posted on:

Wednesday 2nd January 2013
View Replies!