Javascript integration with PHP problem - JavaScript Help


host, $this->username, $this->password) or die(mysql_error()); mysql_select_db($this->db, $con) or die(mysql_error()); } function get_content($id = ''){ $id = mysql_real_escape_string($id); if($id != ''){ $sql = "SELECT * FROM cms_content WHERE id='" . $id . "'"; $return = "Go back to content"; }else{ $sql = "SELECT * FROM cms_content ORDER BY id DESC"; } $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res) != 0){ while($row = mysql_fetch_assoc($res)){ echo "" . $row['title'] . ""; echo "" . $row['body'] . ""; echo $return; } }else{ echo "ID for post does not exist!"; } } function manage_content(){ echo ''; $sql = "SELECT * FROM cms_content"; $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res)==0){ echo "There are no posts. Add one now!"; } while($row = mysql_fetch_assoc($res)){ echo" " . $row['title'] . "
Posted On: Wednesday 2nd of January 2013 12:39:26 AM Total Views:  430
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Links: Images and Buttons

Hi Guys I want to know that when I use an image as a link the mouse pointer changes to hand type pointer. What to do to prevent it I mean how could I make mouse pointer just remain same on image link. Should I buttons then instead. If yes how to add buttons except the default window buttons. If no still tell me how to add external buttons.
VIEWS ON THIS POST

82

Posted on:

Saturday 24th November 2012
View Replies!

Beginner

, I literally just started to learn Javascript today and started with a function that takes in a string and tells you the number of vowels (a,e,I,o,u) in it. It works, but when I use document.write(vowel("hello")) in my body, instead of just giving an output of "this string has 2 vowels in it!", it outputs: this string has 2 vowels in it! undefined Whats going on, here is my code for the function: function vowel(string) { var count = 0; string = string.toLowerCase(); for (i=0;i
VIEWS ON THIS POST

38

Posted on:

Sunday 25th November 2012
View Replies!

javascript Form Page Please HELP!

I am trying to create this form page where NO inner HTML is used. This is what i have so far and I am still trying to get a phone number code with at least ONE dash as well as a valid email address input. How do i generate this code with the work i have so far
VIEWS ON THIS POST

58

Posted on:

Sunday 25th November 2012
View Replies!

Rookie having problem with 2 consecutive Ajax calls:?

, I'm new at Ajax and Javascript. Can anyone help me on this I'm calling 2 Ajax funcions, one after the other, with a delay time in between. The first call executes a script that inserts a row in a MySQL database. The second call execustes a cript that lists what's in the database. What I'm losing is the response from the first script saying a row has been inserted, for instance. It should appear in a div named "message". Seems the response from the second script overrrides it, although it goes to another div named "rows". What I'm trying now is storing the response from the first call in a variable named "reply" and then showing it in the div, along with the reply from the second call. But it's not working (shows as "undefined"), and I don't know why... any help very appreciated. var xmlhttp; var reply; function insertList(str) { insert(str); setTimeout("list()", 100); } function list() { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser too old"); return; } var url="list.php"; url=url+"sid="+Math.random(); xmlhttp.onreadystatechange=stateChangedList; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function insert(str) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser too old"); return; } var url="insert.php"; url=url+"nom="+str; url=url+"&sid="+Math.random(); xmlhttp.onreadystatechange=stateChangedInsert; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChangedLlist() { if (xmlhttp.readyState==4) { document.getElementById("rows").innerHTML=xmlhttp.responseText;
VIEWS ON THIS POST

138

Posted on:

Sunday 25th November 2012
View Replies!

IE8 object doesn't support this property or method

I am trying to preload some sounds for a website I am working on... Originally I used the embed tag but that caused problems in Opera and did not validate... So I've switched to the object tag which now works in everything except IE8... I had to put in a class to hide the sound files because tey were appearing with controls in Opera... .embedded { visibility: hidden; } Lastly here is the javascript code that plays the sound when required... Works in latest FF, Opera, Safari and Chrome but not in IE8... IE8 generates an 'object doesn't support this property or method' error... var thisSound=document.getElementById(soundObj); thisSound.Play(); I'm assuming this is because IE8 can't get the id from the object tag but can't find a work around... I want to make sure all the code validates appropriately so I am trying to avoid the embed tag... Hope someone can help :)
VIEWS ON THIS POST

147

Posted on:

Monday 26th November 2012
View Replies!

function question - JavaScript Help

hello all, was wondering if i can do this:function do_your_thing(){ alert('Help!'); } click me
VIEWS ON THIS POST

99

Posted on:

Tuesday 27th November 2012
View Replies!

setInterval question

please find below a short example program that is designed to show successive rows of cells in a browser (firefox) at regular intervals. My problem is that as the number of cell rows increases the time interval appears to ...
VIEWS ON THIS POST

61

Posted on:

Friday 30th November 2012
View Replies!

simple javascript Listbox OPTIONAL Value calculation.

ok.. trying to figure out a problem with the "Optional" values in a list box so I am going to keep it as simple as I can.. I am trying to calculate the optional value of a list box in stead of programming it the long way around. I created a list box with several peoples names, like John, Sue, and Mary. I have assigned each name a numeric "optional" values John, 10 Mary, 12 Sue, 13 I know the code in the list box should be: var time var total SELECTEDLISTBOX John Mary Sue Normally, I would code this along the lines of: if (SELECTEDNAMELISTBOX=="John"){ alert("Your total is 10.00 * time); } But I want to figure out how to select the Optional Value from the list, and multiply it by time instead of doing the SELECTEDNAMELISTBOX=="John" route.. I figured it would be easier I'm stumped.. so any help would be appreciated.
VIEWS ON THIS POST

59

Posted on:

Monday 24th December 2012
View Replies!

Extract Tag based on the Class Value. - JavaScript Help

Lets say I have a Tag as MyNameMyAddressHow to Extract name Value Only and Not the Address
VIEWS ON THIS POST

127

Posted on:

Friday 28th December 2012
View Replies!

Very newbie question - about clicking on a square and having it change colour - JavaScript Help

Hi all,Sorry about the noob question but I have never programmed in Javascript (PHP and HTML :D ).I wish to have squares (3 wide by 3 deep), and when I click on a square the background colour changes (without reloading the page). Can this be done in Javascript\t and if so where should I go to learn how to do thisPlease don't post the answer as I wish to learn how to do it (if it can be done). Just a simple link to a page that shows me how to do it is fine.James
VIEWS ON THIS POST

122

Posted on:

Monday 31st December 2012
View Replies!

Getting the URL of an IFrame within a 3rd party page - with javascript! - JavaScript Help

Ok, let me draw up a scenario for you :)My site's code: lala.com lol.com's code: from lala.com I want to get lol.com's random url from their iframe.. I DO NOT WANT TO MODIFY THE DOM. BUT IF I MUST ITS OK :PI know that frames[0][0].location WILL WORK in internet explorer, but not in any other browser..I need a cross browser solution, this feature is instrumental and needs immediate attention :). THANKS!
VIEWS ON THIS POST

73

Posted on:

Monday 31st December 2012
View Replies!

Javascript clear text box problem - JavaScript Help

Hi Al, I have the following code below which will insert a value into a text box on click, but i want to clear the current vale of the input field as it inserts the new value.can anyone helpfunction populate (inElem) { var el = document.getElementById("country") // display in text box if (el) { // in case 'foo' does not exist el.value += " " + inElem.innerHTML } if (el2) { el2.value += inElem.innerHTML+"\n" }
VIEWS ON THIS POST

128

Posted on:

Monday 31st December 2012
View Replies!

F F A Linked Web Page Frameset scripting error - JavaScript Help

:rtfm: :confused:I am having a hard time converting the FFA Scripts 3.0 files from Softopedia to a Linked Web Page Recorder. I imagine using frames to submit page URL after page URL, and perhaps even PDF images, to an old Coblat RAQ.Heres the jist, I did some of the organization (Even started and Open Standards Treasury Databanking foundation) 8), and am having a hard time getting a URL cross read from a frame set WWW browsing area with a toolbar, and posted in.function URLString() {document.forms["form1"].URL.text = document.getElementById("linkingframe").src}......Free for Linking by Rich
VIEWS ON THIS POST

83

Posted on:

Monday 31st December 2012
View Replies!

MOVED: Auto-Fill Forum - JavaScript Help

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

100

Posted on:

Monday 31st December 2012
View Replies!

Ajax search, need to add on to URL but how?? - JavaScript Help

Okay, I am creating a search form. There are two search fields.. possibly more in the future so my solution has to be scalable. First Name Last Name function update() { showCategory('firstName',document.searchc.firstName.value); showCategory('lastName',document.searchc.lastName.value); } function showCategory(name,str){ if (str==""){ document.getElementById("PeopleResults").innerHTML=""; return; } if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById("PeopleResults").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","http://www.site.com/ajax/peoplesearchcriteria.php"+name+"="+str,true); xmlhttp.send(); } This currently sends EITHER a first name or a last name search to peoplesearchcriteria.php. I need to send both. As I said since this is scalable I want to use an array like this: // make an array for each form field inputs = document.searchc.elements; numberOfInputs = count(inputs); for(i=0; i
VIEWS ON THIS POST

56

Posted on:

Tuesday 1st January 2013
View Replies!

How to launch a form on top of the existing page ? - JavaScript Help

Guys: I would like to create a functionality so that when I click on a link, it will launch and display a form on top of the existing page instead of navigating away to a new page. This form should be displayed at the center of the screen with a certain width and height. How do I achieve this \t I'm not clear whether this is a PHP or Javascript question. Hope to hear from you.
VIEWS ON THIS POST

110

Posted on:

Tuesday 1st January 2013
View Replies!

Disabled Question - JavaScript Help

document.getElementById("LS").disabled="true";-Worksdocument.getElementById('LS').disabled="false";-Failsdocument.getElementById('LS').disabled=false;-Works-Why\t
VIEWS ON THIS POST

96

Posted on:

Tuesday 1st January 2013
View Replies!

print another page without window popup. - JavaScript Help

Hi all,I want to print a page from another page. I have a master page with links to other page. When I click "print," it should print the another page.The function window.print() is printing only the active page. So on click print i am opening a new window.In the onload event of the target page i have usedEventhough it's working, at the same time the window is also popping up behind the printer set up screen. when i click print or cancel the window gets closed automatically.i don't want the window to pop up. Do suggest me if there is any other alternative way.
VIEWS ON THIS POST

180

Posted on:

Tuesday 1st January 2013
View Replies!

get value from checked checkbox - JavaScript Help

I have dynamic checkboxes, so that number of checkboxes appeared depends on users then how can i get the value from checked checkboxlet say i have this$id is the data that i retrieve from database>thx
VIEWS ON THIS POST

110

Posted on:

Tuesday 1st January 2013
View Replies!

how to get previous checked checkbox value and compare to newly checked box - JavaScript Help

i am trying to create a checkbox limit based on a value changes!If the value of a checked checked box is different then the previous prompt an alert! Some of the check boxes do have the same value. Not all of them!example: I have the following checkbox!(if this was checked) (then this) (would not allow prompt alert) (would allow)my problem is in the if statement function setChecks(obj){d=document.getElementByclass(chk) If(d.value!=d.value) {obj.checked=false alert('you may only choose options from the same dist!') } something like this obviously this will not work but its where im at! So How do i store the previous checked checkbox value and compare it to the just checked box!
VIEWS ON THIS POST

73

Posted on:

Tuesday 1st January 2013
View Replies!

simple jQuery problem.. hopefully! - JavaScript Help

Got it.I had referenced a function in the .JS file above my .click functions that wasnt working, at it was bombing out there. I removed that to see and it works fine.:)
VIEWS ON THIS POST

107

Posted on:

Tuesday 1st January 2013
View Replies!

Delete XML Node With jQuery.remove - JavaScript Help

I wonder whether someone may be able to help me please.I've put together this http://www.mapmyfind.../deletetest.php page which allows users to view a gallery of their uploaded images.Upon initial upload, the physical images are saved in the following file structure: UploadedFiles/userid/locationid/image and the details of the image i.e. description etc are saved in an xml file called 'files.xml' which is stored in the same directory as the physical images.I'm now working on allowing the user to be able to delete these images.By way of a deletion icon under each image, I've, admitedly with some 1st class help from scootstah on this forum, put together the following which successfully deletes the physical image.'onclick Event' Galleria.ready(function() { this.$('thumblink').click(); $(".galleria-image").append( ""); $(".btn-delete").live("click", function(){ var img = $(this).closest(".galleria-image").find("img"); // send the AJAX request $.ajax({ url : 'delete.php', type : 'post', data : { image : img.attr('src') }, success : function(){ alert('Deleting image... '); img.parent().fadeOut('slow'); } }); return false; }); }); delete.phpThe problem I'm having, is deleting the matching node in my xml file, an extract of which can be found below: - I've done quite a bit of research and found that the jQuery had a command call 'jQuery.remove'. Using a brief tutorial I found, I added the folowing to the end of my 'onclick event' script.var doc = $(files.xml); doc.find('file_name:src').remove(); Unfortunately, although I receive no error message, the row in my XML is not deleted, and I'm not really sure why.I just wondered whether someone could have a look at this and let me know where I've gone wrong.Many
VIEWS ON THIS POST

134

Posted on:

Tuesday 1st January 2013
View Replies!

jQuery onClick handler - JavaScript Help

Hi I am using the HTML5 object http://www.w3schools...tryhtml5_objectand want to know how I can attach a funtion to it for onclick.Obviously does not work, so is there a jQuery solution I can implementCheers in advance.
VIEWS ON THIS POST

66

Posted on:

Tuesday 1st January 2013
View Replies!

global variables in requireJS - JavaScript Help

This is a simple demo about my problem.I need to access the id_user in main.js file. My question is, how to avoid global variables in this situation It is bad practice use global variables for this purposemain.js require({ paths : { jQuery : 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min' } }); require([ 'jQuery' ], function() { alert(id_user); }); index.php function users() { id_user = } users();
VIEWS ON THIS POST

70

Posted on:

Tuesday 1st January 2013
View Replies!

Problem with Audio object in iOs - JavaScript Help

I'm developing a mobile app, that uses the Audio object through javascript.The audio works great on Android browser,chrome,firefox and even explorer...But not in safary nor iOs browser.I've tried to use the audio element(no-js) and i get the "Your browser does not support the audio element" message in safary.That's weird because it suppose to work
VIEWS ON THIS POST

118

Posted on:

Tuesday 1st January 2013
View Replies!

Can't get preventDefault() to work - JavaScript Help

Trying to familiarize myself with the preventDefault() event. Created a simple page so that when clicking on a url link, it displays a pop up box instead of, by default, opening up the website.When clicking on the link, it still opens the website. I tried using onmouseover instead of onclick and got errors:http://goken68.brink...entDefault.htmlCode: function urlClick(evt) { evt.preventDefault(); alert("You do not have access rights to that website!"); } Click on the link below to see preventDefault() in action: Go to Website
VIEWS ON THIS POST

133

Posted on:

Tuesday 1st January 2013
View Replies!

help with select and text input - JavaScript Help

I want the drop down select input to change the textbox to the appropriate phone number, but it's not working:Here's the HTML: Pizza 73 Work School Here's the external JS (js_.js): var phoneBook = new Array(); phoneBook["pizza73"] = "780 473 7373"; phoneBook["work"] = "780 444 8621"; phoneBook["school"] = "780 444 8000"; function getPhoneNumber(selected) { var showPhoneNumber = document.getElementById("phoneNumberText").value; showPhoneNumber = phoneBook[selected]; }
VIEWS ON THIS POST

88

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

115

Posted on:

Wednesday 2nd January 2013
View Replies!

jQuery working in Firefox but not IE9 - JavaScript Help

there, I am having a problem with the jquery on my website with Internet Explorer. I have only tested it in IE9 but what i does is it doesn't hide the dropdowns for the list on the right side.The code is like this: jQuery.noConflict(); function initMenu() { jQuery('#resources ul').hide(); jQuery('#resources li a').click( function() { var checkElement = jQuery(this).next(); var one = jQuery(this); if((checkElement.is('ul')) && (checkElement.is(':visible'))) { return false; } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { jQuery('#resources ul:visible').slideUp('normal'); jQuery('#resources li a').removeClass('selected'); checkElement.slideDown('normal'); one.addClass('selected'); return false; } } ); } jQuery(function(){ // bind change event to select jQuery('#jumpMenu').bind('change', function () { var url = jQuery(this).val(); // get selected value if (url) { // require a URL window.location = url; // redirect } return false; }); }); jQuery(document).ready(function() {initMenu();}); jQuery(document).ready(function(){ jQuery(function () { jQuery('div.iframe').load("forum/index.php #navbar"); }); }); It works well in Firefox, however I have noticed that every once in a while it will not load the jquery fully when I go to a new page and the dropdowns will show up expanded instead of collapsed which should be the default.Here is an example of the page:http://bfgamerz.com/...095-Full-ClientIt is also making the popup not working correctly (you have to be logged in to view it) but the popup is just like this: function popup(url,title,height,width,extras){ var windowoptions = 'height=' + height + ',width=' + width + ',' + extras + ''; windoww = window.open(url,title,windowoptions); if (window.focus) {windoww.focus()} return false; }
VIEWS ON THIS POST

80

Posted on:

Wednesday 2nd January 2013
View Replies!

need help in displaying images using codeigniter and ajax - JavaScript Help

I am using json to display images using php codeigniter. What I am trying to do is when I click a particular t shirt image then it should display on container div tag. Currently I am getting json code in this format[{"rows":[{"shirtid":"8","shirt_thumburl":"shirt_designs\/thumbs\/thumb_blue_four.png","shirturl":"shirt_designs\/blue_four.png"}]}]So Now how can I get the shirturl from this json data to display that particular imagehere is my codehere is my controllerclass Shirt extends CI_Controller { public function index() { $this->shirt_thumbs(); } public function shirt_thumbs() { $data['rows'] = $this->Model_shirt_thumbs->get_thumbs(); //var_dump($data); $this->load->view('view_home',$data); } public function get_tshirt() { extract($_POST); $data['rows'] = $this->Model_shirt_thumbs->get_tshirt($id); $JSON_array = array($data); $JSON_response = json_encode($JSON_array); header('Contents: type/json'); echo $JSON_response; } } here is my .js file$(function(){ $('.thumbs').click(function() { var thisid = $(this).attr('id'); var url = 'http://localhost/shirt_designer/shirt/get_tshirt/'; $.ajax({ type: 'POST', url: url, data: 'id=' + thisid, dataType: 'json', success: function(result) { $('#contents').html(result.shirtid); } }); }) });
VIEWS ON THIS POST

62

Posted on:

Wednesday 2nd January 2013
View Replies!

Follow page API (Not User) - JavaScript Help

Is there a way to implement a follow this page Twitter API (Similar to Like this Page that facebook has).
VIEWS ON THIS POST

138

Posted on:

Wednesday 2nd January 2013
View Replies!

how to make a 180? panorama? - JavaScript Help

, anyone can point me in the right direction on how to make a 180 panoramaI have a 180 image of my office, i want to put it on a size with all the width of the open browser (100%) and the user to be able to scroll from the left to the right of the image with rollover.Anyone can help I have searched a lot but nothing of what i found does what i need
VIEWS ON THIS POST

182

Posted on:

Wednesday 2nd January 2013
View Replies!

Detect Return and Redirect - JavaScript Help

a,I'm trying to create an input field that's supposed to redirect me to a page, with a variable the value of the input, when I press enter, but I'm failing..
VIEWS ON THIS POST

120

Posted on:

Wednesday 2nd January 2013
View Replies!

Why wont return false disable enter? - JavaScript Help

I am trying to disable the user from being able to go to a new line in my text area. Why doesn't return false work if (is_key(event, 13) && (with_field.value.length > 1)){ var search_list_ele_array = new Array(); var search_list_ele_array = document.getElementById('with_auto').getElementsByTagName('li'); for (j=0; j
VIEWS ON THIS POST

101

Posted on:

Wednesday 2nd January 2013
View Replies!

javascript null error - JavaScript Help

why i am getting b is null error createelement var b = document.getElementById('clickme'), count = 0; b.onclick = function () { count += 1; b.innerHTML = "Click me: " + count; }; click me
VIEWS ON THIS POST

76

Posted on:

Wednesday 2nd January 2013
View Replies!

Multiple Forms - JavaScript Help

I'm a beginner with javascript, but I want to change my script, that the site doesn't always reload after saving a form. One form with one id I'm able to do, but different forms with the same id I don't know how. These are my forms:QuoteTwitter Follower AdderSite active Yes NoCredits Esoterik ForumSite active Yes NoCredits Twitter Train TweeterMESite active Yes NoCredits Kartenlegen und HellsehenSite active Yes NoCredits AstrologieSite active Yes NoCredits Spirituelle LebensberatungSite active Yes NoCredits Now my question, is there a way to submit each form without reloading the site
VIEWS ON THIS POST

115

Posted on:

Wednesday 2nd January 2013
View Replies!

Insert PHP output into JS variable. - JavaScript Help

Is it possible to make Javascript get output our of php pagefor instance:i want to insert this pagesomething.phpname=jackinto var data
VIEWS ON THIS POST

73

Posted on:

Wednesday 2nd January 2013
View Replies!

jquery hiding a dynamically generated table column - JavaScript Help

I have been playing with jQuery columnManager plugin today http://p.sohei.org/s.../demo/demo.htmland I have been having a problem getting it to work with a dynamically created table ( generated by a jquery ajax call )the code works fine on a static page but i havent been able to figure out the selector for a dynamic tableany ides $('#table').hideColumns(3);
VIEWS ON THIS POST

86

Posted on:

Wednesday 2nd January 2013
View Replies!

alert box - JavaScript Help

Hi ,i want to display in information by hiding background , so that i can get more of users attention.can any one has the script for this take a look at attached screenshot with this.[attachment deleted by admin]
VIEWS ON THIS POST

133

Posted on:

Wednesday 2nd January 2013
View Replies!

Dynamically resize fancybox popup window - JavaScript Help

I've got an index.php page which then opens cars.php in a popup window using fancybox. However, the popup window is always too big for the content which is within it. I've googled it and assumed autoscale or autoDimensions would do the trick but unfortunately not. The content within cars.php can change depending on what I click on within index.php, therefore I can't set a static height and width. Is there any other way of doing it cars.php contains a head and body tag which contains multiple images and some text.
VIEWS ON THIS POST

78

Posted on:

Wednesday 2nd January 2013
View Replies!

fatih - JavaScript Help

HELLO my friendi want to put textbox this php codes but it does not workfor this use combobox onchange event i call "bul()" function but it does not workingTalep Form\t
VIEWS ON THIS POST

82

Posted on:

Wednesday 2nd January 2013
View Replies!

Change the SELECT value in drop down based off of a javascript variable value - JavaScript Help

I want to change the SELECT value based off of a javascript variable value. For example, I wantvar myvariable = NULL;If myvariable = ONLINE do this: ONLINE ONSITE else If myvariable = ONSITE do this: ONLINE ONSITE
VIEWS ON THIS POST

173

Posted on:

Wednesday 2nd January 2013
View Replies!

What is the difference between # and #! - JavaScript Help

what's the difference of the hashes in urls"#"and"#!"What's the benefit or whatever of the !
VIEWS ON THIS POST

55

Posted on:

Wednesday 2nd January 2013
View Replies!

using a calendar script, how to prevent old date selected - JavaScript Help

I have this code which is a calendar popup script.How do I prevent a user from selecting an old date.How can the old date numbers be disabled //
VIEWS ON THIS POST

105

Posted on:

Wednesday 2nd January 2013
View Replies!

2 problems, why won't alert box work and why won't image change? - JavaScript Help

function toggleBg(plus) { if (document.getElementById(plus).style.background=="url('/images/plus.png')"{ document.getElementById(plus).style.background="url('/images/minus.png')"; }else{ document.getElementById(plus).style.background="url('/images/plus.png')"; } } alert("This is a test alert message"); I wanted to change the image of a button when it is clicked from a plus to a minus and then back to a minus. The problem is, it won't change when clicked and if I put minus in the the else bit, it changes to a minus. "url('/images/plus.png')" doesn't seem to match the actual property, so I wanted to get a printout of the actual property using an alert box. But the alert box won't even work when it is in the presence of that function. If I delete the function from the script area, the alert box works. Why doesn't the alert box work in the script above
VIEWS ON THIS POST

239

Posted on:

Wednesday 2nd January 2013
View Replies!

iframe design mode focus - JavaScript Help

I have an iframe that is in design mode, when a user selects text and presses the bold button for example, how can I make it keep the focus after the user bolds the text
VIEWS ON THIS POST

90

Posted on:

Wednesday 2nd January 2013
View Replies!

onClick doesn't work - JavaScript Help

To View The Problem1. http://www.oddim.com/2. Login as test/test3. Hit Update Status4. Notice how when u click the red x the onclick doesn't runDoesn't work on Firefox, that is the problem...Any ideas
VIEWS ON THIS POST

79

Posted on:

Wednesday 2nd January 2013
View Replies!

Scrollbar position - JavaScript Help

Currently got chat box done using SQL and PHP, however when text overflows the scroll bar won't stay at the bottom..Currently using this code (within header): var objDiv = document.getElementById("site_chat_box"); objDiv.scrollTop = objDiv.scrollHeight; Unfortunately it doesn't work :confused:Any ideas
VIEWS ON THIS POST

87

Posted on:

Wednesday 2nd January 2013
View Replies!

Submit form in Greasemonkey - JavaScript Help

I am making a greasemokey script that gets information from the current webpage, creates an invisible form and submits it automattically. The problem I am running into is getting the form to submit. I get an error saying that submitForm does not exist. I did some searching around and could not find much other than the default submit function does not work with greasemonkey. does anyone know how to acheive this
VIEWS ON THIS POST

97

Posted on:

Wednesday 2nd January 2013
View Replies!

Widgets development, how to start? - JavaScript Help

I need to develop a widget.I have read that it is better to develop using Javascript, but using a simple IFrame it is easier.What should I do Develop using Javascript or IFrame. Some tutorial on widgets using Javascript I'am very bad with Javascript.Best
VIEWS ON THIS POST

55

Posted on:

Wednesday 2nd January 2013
View Replies!