Onclick not working? - JavaScript Help


Ok here is my form:
$sql = "SELECT storage.quantity, items.name, items.image, items.description, items.itemid FROM storage JOIN items USING(itemid) WHERE userid='".$_SESSION['userid']."' ORDER BY items.name LIMIT $offset, $rowsperpage"; $result = mysqli_query($cxn, $sql) or die(mysqli_error($cxn)); $imagecount = 0; $tableOutput = ""; while ($row = mysqli_fetch_assoc($result)) //while there are still results { $imagecount++; $quantity = $row['quantity']; $name = $row['name']; $image = $row['image']; $description = $row['description']; $itemid = $row['itemid']; //Create TD $tableOutput .= "\n"; $tableOutput .= "\n"; $tableOutput .= "
"; $tableOutput .= $name."\n"; $tableOutput .= "".$description."\n"; $tableOutput .= "".$quantity."\n"; $tableOutput .= "\n"; $tableOutput .= "Remove 1
\n"; $tableOutput .= "Remove \n"; $tableOutput .= "\n"; $tableOutput .= "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "Item\n"; echo "Description\n"; echo "Quantity\n"; echo "Remove\n"; echo "\n"; echo $tableOutput; echo "
\n"; echo "\n";Just ignore the PHP part of it. This is going through a while loop as you can see, but the function "removeOne()" and "remove()" has the itemid in the parantheses so the javascript can catch that value.
But the problem is, that it's not even catching the function.
One of the functions (removeOne) looks like this:

$(document).ready(function() { function removeOne(n) { alert("hi"); $.ajax( { type: "GET", url: "storageprocess.phpitemid="+ n, data: "itemid="+ n, success: function() { alert("Item has been moved to inventory."); } }); } }); Just ignore the AJAX part. I put the alert("hi"); in the beginning to see if it's even catching the onclick and it's not. So I don't understand why the onclick isn't preparing the function..
Can anyone help me here
Posted On: Friday 28th of December 2012 04:21:56 AM Total Views:  98
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




prototype

Does anyone knows how to work with prototype ajax class , cause I think this class has everything and there is no use of rewriting the code s !!!\t
VIEWS ON THIS POST

243

Posted on:

Monday 19th November 2012
View Replies!

More Efficient Substitute For Eval Function?

all! I just watched a tutorial on writing efficient javascript code and it told me to avoid using the eval() function because it is inefficient as far as speed. It says to try to use an anonymous function instead, but I can't seem to get an anonymous function to do the same thing I want an eval() to do when it comes to changing a property of an object. Here is the eval() function I currently have that works(from Dreamweaver): function MM_changeProp(objId,x,theProp,theValue) { //v9.0 var obj = null; with (document){ if (getElementById) obj = getElementById(objId); } if (obj){ if (theValue == true || theValue == false) eval("obj.style."+theProp+"="+theValue); else eval("obj.style."+theProp+"='"+theValue+"'"); } } This successfully changes the properties of stuff. How can I have a function that does not use the eval() function which changes properties successfully I tried writing an anonymous function, but I couldn't get it to work.
VIEWS ON THIS POST

187

Posted on:

Wednesday 21st November 2012
View Replies!

Iframe issue or google issue ??

Guys i was loading google.com in iframe till now!!! but from 2 days its not loading!!!!! any suggestions , and if theres any alternative to iframe please let me know .
VIEWS ON THIS POST

225

Posted on:

Saturday 24th November 2012
View Replies!

jquery 3d carousel

hello friends... I'm new to jquery and as well as to daniweb :P I'm learning jquery from 3 days using online tutorials... I am given a task by my guide... For which i want to know why is it that the jquery carousel on the page http://web.enavu.com/demos/3dcarouselwip/ works in firefox and chrome but not in IE can anyone help me on this
VIEWS ON THIS POST

377

Posted on:

Saturday 24th November 2012
View Replies!

java script help 2020

I see code but no question!
VIEWS ON THIS POST

186

Posted on:

Saturday 24th November 2012
View Replies!

Center Div in Browser

A requirement for the project I am currently working on is that when various links on a page are clicked that the appropriate "layer" (i.e. div) will be displayed centered in the browser. I have tried using various javascript solutions and they center some div's and not others. Does anyone have an example of a way to show and hide a div that is centered in the browser no matter where the div is located in the html Any html/css and javascript code examples greatly appreciated!
VIEWS ON THIS POST

427

Posted on:

Saturday 24th November 2012
View Replies!

brief walk through AJAX??

daniweb users, i would like a brief walk through on AJAX if you'll can, i already looked through the post and didn't find what i was looking for, i would like to know how to refresh evertying on a web page but the header, which contains the navigation bar that way only the content info is refreshed,
VIEWS ON THIS POST

413

Posted on:

Sunday 25th November 2012
View Replies!

Dynamic list of tagged posts, tumblr

. Been searching all night for a way to do this, so thanks in advance for any help forthcoming. I'd like to be able to create a list of post titles that share the same tag in tumblr (rather than a list of tags). Tumblr allows you to filter your posts by tag by typing in a url, but this brings up a full page of posts, and I'd just like a list of the titles that I can then use as a menu. Hope this all makes sense. I'd imagine this is fairly simple as the capability to filter by tag already exists, but I cannot for the life of me work out how to do it.
VIEWS ON THIS POST

545

Posted on:

Sunday 25th November 2012
View Replies!

Whether it is possible to find the response url in?

I have a problem as following... # I have stored some value in session to reach a Page "A" # I have other pages "B", "C", "D". # If I am moving from Page "A" to "B", I should not clear my session value but If I am moving from "A" to "C" or "A" to "D", then I have clear some values in session. # I have clear it on body unload of "A" on condition. Is there any way to find the URL which I am landing via javascript Is there any other way or work around to solve this problem. Note: I have menu in my left frame and content in right frame. my links to move from "A" to "B", "C" and "D" are in menu.
VIEWS ON THIS POST

380

Posted on:

Sunday 25th November 2012
View Replies!

Run function every x seconds

I'm writing a script for a chatbox and I want to run the function to retrieve the messages from the .xml file every five seconds or so. How would I do that
VIEWS ON THIS POST

82

Posted on:

Monday 26th November 2012
View Replies!

Javascript CSS rollover problem

I have some code to change the background color of DIV tags. Each DIV is a little block. It was not working now it is and I thought I would leave in case someone could use it. Dynamic CSS Properties #box1{ position: absolute; top: 20px; left: 50px; width: 200px; height: 150px; border: solid #ff0000 3px; background-color: #ffff00; color: #000000; padding: 10px; } #box2{ position: absolute; top: 20px; left: 250px; width: 200px; height: 150px; border: solid #ff0000 3px; background-color: #ffff00; color: #000000; padding: 10px; } function change(id){ document.getElementById(id).style.borderColor = "#0000ff"; document.getElementById(id).style.backgroundColor = "#000000"; document.getElementById(id).style.color = "#ffffff"; } function change_back(id){ document.getElementById(id).style.borderColor = "#ff0000"; document.getElementById(id).style.backgroundColor = "#ffff00"; document.getElementById(id).style.color = "#000000"; } This post has been edited by jjsaw5: 24 December 2008 - 05:44 AM
VIEWS ON THIS POST

79

Posted on:

Monday 26th November 2012
View Replies!

issue with calender script

hiii ppl of the forum.. I have this date field in the form, i managed to get the calender script work, when i select the date, it appears properly in the text field, but on cliking submit, it gets stored as 0000-00-00 in the database. any idea frens what is happening here..please help me out
VIEWS ON THIS POST

75

Posted on:

Monday 26th November 2012
View Replies!

My Javascript Search box needs a little tweak...

Hi , I am new to javascript so thought I's post here for some advice. I'm trying to complete a simple keyword search where the keyword is forwarded on the end of a url. I have this working-(ish), but at the moment it's doing this: 1. Add keyword and hit send 2. Opens a new window to confirm search term. 3. Clicking that sends you to the target site with keyword on the end. I'm trying to bypass stage 2 and go straight to 3 from step 1. Code so far: Untitled Document function searchFunc() { var newWindow = window.open("about:blank", "searchValue"); var searchValue = document.search.queryField.value; var keywordSearch = document.search.keyword.value; newWindow.document.write("Confirm Search\n"); } I've tried deleting some of the code but always lose functionality. Any advice
VIEWS ON THIS POST

200

Posted on:

Monday 26th November 2012
View Replies!

Positioning a nav bar with css and javascript

I have a question on an assignment I'm working on. I know it should be easy, but I cannot figure it out. For the assignment we are supposed to do the following... Create a nav bar that is 150 px wide (done), has yellow background and blue links (done), and when hovered over with a mouse changes to a blue background with yellow links (done). What I'm stuck on is the positioning of the nav bar. It is supposed to be 10 px from the right edge of the screen no matter what the current screen's width. I think I need to use the window.innerWidth (minus the width of the nav bar) reference, but I don't quite know how or where to write it into the statement. Can anyone give me some pointers thanks, Tammy Tammy Smith Scripting Exercise #2, Chapter 15 DHTML - Chapter 15 in Javascript One Two Three Four Enter text here...
VIEWS ON THIS POST

73

Posted on:

Monday 26th November 2012
View Replies!

Table creates new rows when a question is submitted - JavaScript Help

I have a table which has the number of rows depended on what the number is in the spinner. This does work e.g If I enter 25 in spinner it comes up with 25 rows, if I enter 7 in spinner comes with 7 rows.So my problem is this:What I have is a textarea where the user enters in their question and then submits the question, the question should be inserted and appear under the "Question" column.The problem is that everytime I submit a question into the table, it creates a new row. So if I had 20 empty rows in the table because I stated in the spinner I wanted 20 questions, then what happens is everytime I submit a question, it adds a new row every time, I want the question to be inserted in a current row starting from 1st row add going down 1 row every time a question is submitted.I have attached a document with this question which will show you how I want it to be displayed and what is displays currently and would hopefully explain it better for you if you are a bit confused.Below is my javascript code: function insertQuestion() { var table = document.getElementById("qandatbl"); var tableBody = table.tBodies[0]; var textarea = document.getElementById("questionTxt"); var row = document.createElement("tr"); tableBody.appendChild(row); var enumeratorCell = document.createElement("td"); enumeratorCell.className = "qid"; row.appendChild(enumeratorCell); var questionCell = document.createElement("td"); questionCell.className = "question"; row.appendChild(questionCell); var weightCell = document.createElement("td"); weightCell.className = "weight"; row.appendChild(weightCell); var answerCell = document.createElement("td"); answerCell.className = "answer"; row.appendChild(answerCell); var questionText = textarea.value; var questionContent = document.createTextNode(questionText); questionCell.appendChild(questionContent); }Html code of table and text area with submit button:// table where questions will be inserted into // this get the number of questions from the spinner //Text Area and submit button to submit questions
VIEWS ON THIS POST

118

Posted on:

Tuesday 27th November 2012
View Replies!

need help with swfobject - JavaScript Help

i want to embed flash in my php script need help with swfobject
VIEWS ON THIS POST

230

Posted on:

Tuesday 27th November 2012
View Replies!

JQuery Character Problem - JavaScript Help

hi users good works i have charecter problem pls help me it for js or php problem ..if i inserting data to mysql the charecters are changing new bad charectersQuote and its in the down JS file akeditable.js unction akedit(url,element_id,settings) { if(document.getElementById('frm'+element_id)) return false; //form is already thier so no need to do it again. 10:40 PM 1/4/2008 amit singh if(document.getElementById('akebutton')) reset(old_content,objtoedit);//another button is already their so reset the content as new 'Edit' has been clicked. objtoedit=document.getElementById(element_id); old_content=objtoedit.innerHTML.replace("\r\n",""); objtoedit.innerHTML=''; //create textbox or textarea /* create the form object */ var f = document.createElement('form'); f.id='frm'+element_id; /* main input element */ var i; if ('textarea' == settings.type) { i = document.createElement('textarea'); if (settings.rows) { i.rows = settings.rows; } else { i.rows =4; } if (settings.cols) { i.cols = settings.cols; } else { i.cols=50; } } else { i = document.createElement('input'); i.type = settings.type; /* https://bugzilla.mozilla.org/show_bug.cgiid=236791 */ i.setAttribute('autocomplete','off'); } i.name = settings.name; i.id = 'txt'+element_id; i.value=old_content; f.appendChild(i); f.appendChild(document.createElement('br')); if (settings.submit) { var b = document.createElement('input'); b.type = 'submit'; b.value = settings.submit; b.style.backgroundColor='#ff6666'; b.style.color='#ffffff'; f.appendChild(b); } var b = document.createElement('input'); b.type = 'button'; b.id = 'akebutton'; b.value = 'cancel'; b.style.backgroundColor='#dddddd'; b.style.color='#6E6E6E'; b.style.marginLeft='5px'; b.onclick =function(e){ reset(old_content,objtoedit); if (!e) window.event.cancelBubble = true else e.stopPropagation(); } f.appendChild(b); f.onsubmit=function(e) { /* do no submit */ if (!e) window.event.returnValue = false; else e.preventDefault(); /* add edited content and id of edited element to POST */ var p = {}; p[i.name] = $(i).val(); p['id'] = element_id; /* show the saving indicator */ objtoedit = document.getElementById(element_id); objtoedit.innerHTML="Saving....."; $.post(url, p, function(str) { objtoedit.innerHTML=str; }); } objtoedit.appendChild(f); i.focus(); i.onkeydown=function(e){ if (!e) { var e = window.event; e.preventDefault = function() { window.event.returnValue = false } } if (e.keyCode == 27) { e.preventDefault(); reset(old_content,objtoedit); } }; } function reset(oldContent,objtoreset) { objtoreset.innerHTML = oldContent; }its inculded in the file and allready i am using this charecter type in html in mysql in php files ; also i did change charecter groop of akeditable.js file ASI to UTF-8 but mysql updating isnt working when i send query sending type turkish_latin 5 and ISO-8859-9 to falling of absurd chacters. so mysql charecter name is TurkishLatin5_ci but charecters doing like " \t"its included in the page allready Pls help me mysql_query("SET CHARACTER SET ISO-8859-9"); mysql_query("SET COLLATION_CONNECTION = 'latin5_turkish_ci'"); header("Content-Type: text/html; charset=ISO-8859-9")
VIEWS ON THIS POST

58

Posted on:

Tuesday 27th November 2012
View Replies!

Need som help with lightface - JavaScript Help

I use a script called lightface to bring up a facebook like popon box on my site.window.addEvent('domready',function(){ document.id('sup').addEvent('click',function() { light = new LightFace.IFrame({ height:350, width:640, url: 'editContact.phpuser=', title: 'Edit Contact information!' }).addButton('Close', function() { light.close(); },true).open(); }); });That's the code I use to load a page in lightface, however I want to create it so that it can retrieve a php value into the site I open in lightface. In my case I'm trying to load a post id. Does anyone have any suggestions how I'd go about doing that
VIEWS ON THIS POST

210

Posted on:

Tuesday 27th November 2012
View Replies!

best way to stop this function from running twice? - JavaScript Help

I have a function that is running twice because you have to click on the same div twice to delete a comment (the first click changes the text to confirm that you want to delete it, the second one deletes it)I can't seem to figure out the best way to atleast stop part of the code from running twice.I have commented parts of it to give you an idea of what i need to happenfunction delete_comment(rid) { var result = rid.split("-"); var id = result[1]; var post_id = result[2]; /////On first click div txt changes from "X" to "Delete", and the css changes some. $("#"+rid).html("Delete"); $("#"+rid).css({backgroundColor: "#FFE1E1", color: "#333"}); ///////On Second click the ajax runs (this is the part of the code that i can't have run twice) $('#'+rid).click(function() { $("#"+rid).html("Deleting.."); $.ajax({ type: "POST", url: "ajaxpages/php/delete_comment.php", data: 'sub_comment_id='+id, cache: false, success: function(html){ $("#sub-comment"+id).slideUp("fast"); ////this code below is the code i cannot have running twice, it is suppose to subtract just 1 from the hidden field for another function of my website, but since the code is running twice it subtracts 2 from it, It is only suppose to subtract 1 per comment that is deleted. var valu = document.getElementById('value'+post_id); valu.value = parseInt(valu.value) - 1; } }); }); }
VIEWS ON THIS POST

113

Posted on:

Tuesday 27th November 2012
View Replies!

jQuery Calculation Plug-in grand total to hidden input - JavaScript Help

,I'm using the jQuery calculation plug-in found here: http://www.pengowork...tion.plugin.htmI have the form working great, it's displaying the grand total in a span tag, this works for our needs but I also need it to add the total to a hidden input field for our payment gateway checkout. I do not know enough javascript to get it working, I'm more of a php guy ;D any help you could give would be great, thanks .Here is our input code:Here is our javascript:var bIsFirebugReady = (!!window.console && !!window.console.log); $(document).ready( function (){ // update the plug-in version $("#idPluginVersion").text($.Calculation.version); // bind the recalc function to the quantity fields $("input[name^=qty_item_]").bind("keyup", recalc); // run the calculation function now recalc(); // automatically update the "#totalSum" field every time // the values are changes via the keyup event $("input[name^=sum]").sum("keyup", "#totalSum"); // automatically update the "#totalAvg" field every time // the values are changes via the keyup event $("input[name^=avg]").avg({ bind:"keyup" , selector: "#totalAvg" // if an invalid character is found, change the background color , onParseError: function(){ this.css("backgroundColor", "#cc0000") } // if the error has been cleared, reset the bgcolor , onParseClear: function (){ this.css("backgroundColor", ""); } }); // automatically update the "#minNumber" field every time // the values are changes via the keyup event $("input[name^=min]").min("keyup", "#numberMin"); // automatically update the "#minNumber" field every time // the values are changes via the keyup event $("input[name^=max]").max("keyup", { selector: "#numberMax" , oncalc: function (value, options){ // you can use this to format the value $(options.selector).val(value); } }); // this calculates the sum for some text nodes $("#idTotalTextSum").click( function (){ // get the sum of the elements var sum = $(".textSum").sum(); // update the total $("#totalTextSum").text("$" + sum.toString()); } ); // this calculates the average for some text nodes $("#idTotalTextAvg").click( function (){ // get the average of the elements var avg = $(".textAvg").avg(); // update the total $("#totalTextAvg").text(avg.toString()); } ); } ); function recalc(){ $("[id^=total_item]").calc( // the equation to use for the calculation "qty * price", // define the variables used in the equation, these can be a jQuery object { qty: $("input[name^=qty_item_]"), price: $("[id^=price_item_]") }, // define the formatting callback, the results of the calculation are passed to this function function (s){ // return the number as a dollar amount return "$" + s.toFixed(2); }, // define the finish callback, this runs after the calculation has been complete function ($this){ // sum the total of the $("[id^=total_item]") selector var sum = $this.sum(); $("#grandTotal").text( // round the results to 2 digits "$" + sum.toFixed(2) ); } ); }
VIEWS ON THIS POST

48

Posted on:

Tuesday 27th November 2012
View Replies!

Replacing a regex match with changed matched results.

I was trying to do something similar to code highlighting but can't find a good way to do it. For example lets take this code: def some_function(): something() somethingElse() def some_other_function(): something2() somethingElse2() Now it is easy to find and replace constant words like def with something like this: string = string.replace(/def\s/gi, "def "); But what if i want to make functions bold I wan't to find a way to send the current match as a second parameter(ofcurse changed). Something like: chg = chg.replace(/\w+\(\):/gi, "" + matched_string + ""); How can i do this
VIEWS ON THIS POST

107

Posted on:

Thursday 29th November 2012
View Replies!

How to set default value for select ?

Pending Accepted Rejected For this how to set default value which is there in the variable $appstatus..... It is little bit urgent. Please help me.... MOD EDIT: Added code tags. When posting code...USE CODE TAGS! And we really couldn't care less how urgent it is for you. This post has been edited by JackOfTrades: 25 February 2012 - 04:55 PM
VIEWS ON THIS POST

183

Posted on:

Thursday 29th November 2012
View Replies!

Linking external page

http://sample.1littleworld.com/sample3.html click on Songs>>1960>>A - E This should open a window which should take you to google.com What I am looking at doing is having the red bordered area "content 1" first display a page based upon the year selected. ...
VIEWS ON THIS POST

74

Posted on:

Friday 30th November 2012
View Replies!

Re: array length problem

Steve meinte: > I am having problems with this piece of script. Usually the script > works and the alert gives an array length of 9. But every so often the > array length is 8 and naturally the output ...
VIEWS ON THIS POST

120

Posted on:

Friday 30th November 2012
View Replies!

explorer and mime-types

is there a way to know which mime-types explorer have installed and which plugin is associated to it In Mozilla browsers there are navigator.plugins and navigator.mimeTypes.....
VIEWS ON THIS POST

75

Posted on:

Friday 30th November 2012
View Replies!

Automatically clear users data if left unattended (AJAX)

New security method where users data automatically 'disappears' if left unattended with mouseout function using AJAX. The principal behind the function is to set an arbitratory timer where the DIV Element is updated to show a blank field(s). This can ...
VIEWS ON THIS POST

167

Posted on:

Friday 30th November 2012
View Replies!

Enable an asp control runat server via javascript, until this control is not enable from server

I have seen that if I put a radiolistbutton on a page with 3 radiobutton and the first (as example) is not enable at design time (so server side), i can't enable it from javascript with something like this var ...
VIEWS ON THIS POST

313

Posted on:

Friday 30th November 2012
View Replies!

help - onChange and Confirm

I have a combobox with a list of links and I want to redirect (after confirming it) to a link with onChange. I use: onChange="if (confirm('do you want to redirect')) { window.location.href='yespage.asp'}; I have this problem: if I change ...
VIEWS ON THIS POST

116

Posted on:

Friday 30th November 2012
View Replies!

APPLIED COMPUTING 2008 - Last Call for Papers

Apologies for cross-postings. Please send to interested colleagues and students Submission Deadline (second call): 28 January 2008 ************************************************************* IADIS INTERNATIONAL CONFERENCE APPLIED COMPUTING 2008 April 10-13, 2008 - ALGARVE, PORTUGAL ( http://www.computing- conf.org/) ************************************************************* * Keynote Speaker (confirmed): Marcin Paprzycki, ...
VIEWS ON THIS POST

66

Posted on:

Friday 30th November 2012
View Replies!

making another option box appear ??

, I am wondering if this is possible with JavaScript and how I would accomplish something like this: I have a page with a form on it with option list box on it with options such as: lstcirc, lstpress, lstmail, ...
VIEWS ON THIS POST

81

Posted on:

Friday 30th November 2012
View Replies!

window.getSelection on a textbox

How can i use window.getSelection to get the selected text from a textbox This does not work on Firefox.
VIEWS ON THIS POST

181

Posted on:

Friday 30th November 2012
View Replies!

SWFOBject problem on IE 6.0.

! I have a problem with javascript script called: SWFObject. I have a web page which displays on IE 7.0. i Firefox in a good way. flash objects are displayed on a web page. The problem is on IE ...
VIEWS ON THIS POST

59

Posted on:

Friday 30th November 2012
View Replies!

Create input button with event

I'd like to create an input button with a click event calling a javascript function. pretty basic. I just can't figure out how to wire the onclick event. this is what I have so far: function createButton(text, clickEvent) { ...
VIEWS ON THIS POST

70

Posted on:

Friday 30th November 2012
View Replies!

SWF Files

I have some Flash SWF games on my website with advertising banners on them. People access a certain game by going to http://www.mysite.com/flashgame.htm . With IE no problem. But in Firefox they can type in http://www.mysite.com/flashgame.swf and bypass my banners. ...
VIEWS ON THIS POST

93

Posted on:

Friday 30th November 2012
View Replies!

Dynamic form fields added with appendChild or innerHTML do not POST on submit in Firefox

I spent several hours struggling with dynamic form fields added with appendChild or innerHTML not POSTing on submit in Firefox. The only way I found to make it work is to append any created fields to a DIV within the ...
VIEWS ON THIS POST

67

Posted on:

Friday 30th November 2012
View Replies!

JavaScript "objects" to extend HTML Elements

Hi! I create HTML pages on the server side. I want to extend DIV elements with more information. E.g.:
Now I want Joe to have an age for example and access it using: $('joe').age = 20; Doing ...

VIEWS ON THIS POST

234

Posted on:

Friday 30th November 2012
View Replies!

new to JS

I'm new to Javascript and just by looking at the code in pages it looks to me to be a cross between C, C++ and maybe pascal. If it is Pascal that declares variable as var. Objects like document.write() ...
VIEWS ON THIS POST

62

Posted on:

Friday 30th November 2012
View Replies!

Algorithm Question

I have some stupid questions.... - Why would program 1 run a lot faster than program 2 Can someone explain If I change the sample_size to be a larger one, program 2 will my browser freeze!! - What is the ...
VIEWS ON THIS POST

93

Posted on:

Friday 30th November 2012
View Replies!

form tag movement preventing progress bar?

when i use the first one.. i see the progress bar, when i edit it like the second example, i dont see the progress bar.. can anyone tell me what im doing wrong.. all i did was change the position of the opening form tag EXAMPLE 1: ... ...   MB Share: Send it Via E-Mail File Url URL: : :
VIEWS ON THIS POST

51

Posted on:

Sunday 23rd December 2012
View Replies!

html in text box

, I was trying to print html in textbox. problem is i dont want to see html tags for table like but print only table and it is conete. HOw to make this work.. thx in advacne, Menuka
VIEWS ON THIS POST

55

Posted on:

Sunday 23rd December 2012
View Replies!

question: how to read local xml file

hi experts. if its possible to read xml files locally from an html page using javascript without using any local server tia.
VIEWS ON THIS POST

53

Posted on:

Sunday 23rd December 2012
View Replies!

comparing 2d array to a picture

, I am developing a battleship game in javascript. I created a table of grid squares pictures. In the tags in included onclick = "a specific method to place a ship(this.id). This is not working. I am wondering if there is an easier way to pass an id through a parameter or would I have to do something different
VIEWS ON THIS POST

54

Posted on:

Sunday 23rd December 2012
View Replies!

my error message seems to be missing

i tried coding a different login page but it didnt work and it was very messy so i am making another one the problem is when the incorrect user or password is inserted it is supposed to display an error message saying "wrong username and password" when instead it just gives me a blank page any ideas on why my error message wont show\t my code is
VIEWS ON THIS POST

44

Posted on:

Sunday 23rd December 2012
View Replies!

Enable Button after clicking all links

I actually know a bit of PHP but I need help. I have all links that is needed to be click on so what I want to do is, after they click all 4 links, it will enable the button. I know that we have to do this in Javascript but I'm stuck. Example, there 4 links, after they click all links, it will enable the button.
VIEWS ON THIS POST

54

Posted on:

Sunday 23rd December 2012
View Replies!

Switching styles with javascript

people! I am just working on this small html file with some html/css/and js and wanted to ask something concerning applying css through js. html: var lastID = 0; function SelectImg(id) { if (lastID > 0) { document.getElementById(lastID); } document.getElementById(id); document.getElementById(0).src = document.getElementById(id).src; lastID = id; } function LoadTrigger() { SelectImg(1); } window.onload = LoadTrigger; Client: Client's Name Project: Project's Name The Pharmacy Guild of New Zealand provides member pharmacies and pharmacists with a diverse range of services designed to support and enhance the commercial and professional interests of community pharmacy. Earlier this year, The Alchemist was pleased to welcome the Pharmacy Guild as a new client. We now manage their brand, including the design of several regular newsletters, stationery, display materials, advertising and all other collateral. Previous Page | Next Page CSS: /* Theme Name: Evalue Theme URI: N/A Description: A theme built for http://evalueresearch.co.nz/ Version: 1.0 Author: Michael Mudge Author URI: N/A Tags: evalue */ body { margin:0px; background-color:#8ddee4; } #page { width:820px; margin:0px auto; } #header { width:820px; margin-top:50px; height:110px; float:left; } #nav { float:left; height:29px; width:100%; overflow:hidden; background-color: #dff6f7; background:url(images/navbar/background.jpg); margin-bottom:8px; } ul.style { list-style:none; } #title { float:left; width:100%; margin-top:50px; border-bottom:2px solid #aee8ec; } #leftcol { float:left; width:556px; width:580px; overflow:hidden; } #main { float:left; margin:1px; width:548px; } .content { padding-top:3px; } #sidebar { margin-left:20px; width:226px; width:220px; float:left; } #footer { height:10px; width:802px; padding-top:24px; margin-top:10px; padding-bottom:20px; margin-bottom:10px; Color:#ffffff; border-top:2px solid #aee8ec; } /* nav style */ #nav li.at { margin-top:-29px; } #nav li:hover { margin-top:-29px; } #nav li { float:left; } #nav p { margin:0px; padding:0px; } /* sidebar styles */ #contact { padding-bottom:10px; margin-bottom:30px; border-bottom:2px solid #aee8ec; } #contact a { color:#FFFFFF; margin:8px 0px 11px; font-weight:normal; } #contact h4 { margin:0px; padding-top:11px; color:#FFFFFF; border-top:2px solid #aee8ec; } #contact p { margin:6px 0px 11px; } #sidebar h4,#sidebar p,#sidebar a { } #linkcat- h2 { *margin-bottom:10px; } ul.blogroll li { margin-bottom:12px; line-height:13px; } #sidebar .blogsidebar { line-height:19px; } #sidebar .blogsidebar h4 { font-size:14px; margin-top:26px; } #sidebar .blogsidebar ul { list-style:none; } #sidebar .blogsidebar li { list-style:none; } #sidebar .archives a{ color:#353333; font-size:12px; color:#FFF; } /* general styles */ .clearer { clear:both; } .otherclearer { padding-bottom:52px; } .spacer { padding-bottom:16px; } .rsource_clr { padding-top:40px; } .leftcol img { margin:7px 0px; } img { border:none; } ul { padding:0px; margin:0px; } .styler { padding-left:20px; list-style:url(http://www.evalueresearch.co.nz/bullet.jpg); } li { margin-bottom:2px; padding: 0px; text-indent: 0px; background: transparent; } .format { padding-left:20px; margin-top:2px; } #team_image { background: url(http://www.evalueresearch.co.nz/wordpress/wp-content/themes/evalue/images/TeamPhoto.jpg); } /* general text style */ body { font-family:Arial,Helvetica,sans-serif; font-size:12px; line-height:17px; color:#353333; } a { font-weight:bold; text-decoration:none; color:#ffffff; } .bold, strong, .strong { font-weight:bold; } p { margin:8px 0px; } h2 { font-size:20px; } h3 { font-size:15px; } h4 { font-size:12px; font-weight:bold; margin: 7px 0; } /* resources styles */ .resources p { margin:0px; margin-bottom:20px; } .resources h4 { font-size:14px; margin:0px; margin-top:20px; } /* blog styles */ .blog { width:548px; } .post { margin-bottom:50px; } .post .date { font-size:14px; font-weight:bold; } .post .title { font-size:18px; font-weight:bold; color:#ffffff; } .post .categories{ color:#ffffff; } .post .categories strong{ color:#353333; } .post .content { margin-bottom:15px; } .post .footer { background-image:url("images/postfooter.jpg"); background-repeat:no-repeat; *position:relative; margin:0px -16px; line-height:16px; font-size:11px; padding:0px 16px; *padding: 1px 16px; } .post .footer a { color:#353333; } .postinfo { padding-left:7px; } .post .footer .postinfo { height:16px; margin:3px 0px; float:left; } .post .footer .share { float:right; font-size:11px; line-height:11px; height:16px; margin-top:3px; } .post .footer .share a { font-weight:normal; margin-right:10px; vertical-align:middle; } .post .footer .share img { margin:0px; padding:0px; } .postnav { margin:20px 0px 10px 0px; width:100%; font-size:13px; } .button a{ color:#FFFFFF; } .alignleft { float:left; padding-bottom:8px; } .alignright { float:right; } /*old blog styles */ /* ol.commentlist { padding-left:15px; float:left; width:100%; } li.comment { border:2px solid #AEE8EC; padding:4px 8px; margin:10px 0px; list-style:decimal; width:80%; } li.comment .date-author { font-size:11px; } .date-author strong { color:#ffffff; } */ /* footer styles */ #footer li.last { padding-right:30px; border:none; } #footer li { float:left; padding:0px 10px; border-right:1px solid #ffffff; } #footer ul { float:left; width:556px; list-style: none; } #footer #white { float:left; width:20px; position:relative; top:-20px; height:30px; background-color:#FFFFFF; } /* image styles */ img.alignright {float:right; margin:0 0 1em 1em} img.alignleft {float:left; margin:0 1em 1em 0} img.aligncenter {display: block; margin-left: auto; margin-right: auto} a img.alignright {float:right; margin:0 0 1em 1em} a img.alignleft {float:left; margin:0 1em 1em 0} a img.aligncenter {display: block; margin-left: auto; margin-right: auto} What I have going here is a static page that has thumbnail images switching to be displayed in a large viewing div when clicked. It's probably simple as, but what I am trying to do that when a thumbnail has been clicked, thus displaying it on the big div, to have the thumbnail turn slightly tranparent (to show that it has been selected). Is there a way just to decrease the opacity and make the image lighter without replacing the image I've looked into some tutorials about replacing a class or inline styles but they all end up getting awfully muddled.
VIEWS ON THIS POST

50

Posted on:

Sunday 23rd December 2012
View Replies!

Cookie - data

OK, how do I make a textbox that takes the data you enter and saves as a cookie using Javascript I know how to retrieve data I just don't know how to save it.
VIEWS ON THIS POST

87

Posted on:

Monday 24th December 2012
View Replies!

Clientside Area code-State crosscheck

all, So here's the sitch. I've got a form that submits to a third party data manager, which in itself, has been a nightmare, but that's not the point. For some reason, their database doesn't crosscheck the area code of the number they input, with the state they select. I need to be able to validate that the area code they enter in the phone number field, is actually in the state they select. My understanding of javascript is fairly limited, I can imagine how the script should be, but I can't figure out how to implement it. I already have a list of all the states, and the area codes in those sates. Below is the clientside validation code I'm using now: var MinDebt = 10000.00; function fnEnterInfo() { if (fnValidateEmp() && fnValidateEmail() && fnValidatePhones() && fnValidateExtNumbers() && ValidateIntNumbers() && ValidateTotalDebt()) { document.frmFirstInfo.submit(); } } function fnValidateEmp() { FormName = "document.frmFirstInfo"; FeildsNames = new Array("F_NAME","L_NAME","HOME_PHONE1","STATE","E_MAIL","TOTAL_DEBT"); for(i=0;i
VIEWS ON THIS POST

130

Posted on:

Monday 24th December 2012
View Replies!

Javascript: write Contents back to a file

I have a client that whats me to redesign a site for them, so I will be using CSS. They also want me to be able to update the style sheet. I need to use javascript to re-write the file and then create a back-up file of the file that it just replaced. Then after 5 back-ups, the oldest style sheet is deleted. Both of these files will be placed in the same folder on a unix webserver and the it will have a folder named back-up for all the 5 backed-up style sheets. It needs to be able to work in IE and firefox (at least) I have no clue on where to start since I have never done file editing and creation in javascript before (i have in php)
VIEWS ON THIS POST

56

Posted on:

Monday 24th December 2012
View Replies!

String replace in javascript - JavaScript Help

There's this line of code within a .js file: o.tweet_raw_text = o.retweet ('RT @'+o.retweeted_screen_name+' '+item.retweeted_status.text) : item.text+o.bird; This line is referenced inside a javascript as "{tweet_raw_text}" that displays a tweet.What I'd to do is use this php function inside the javascript: $str = preg_replace('/http:\/\/.*$/i', '', $str)
VIEWS ON THIS POST

43

Posted on:

Friday 28th December 2012
View Replies!

Alter element name(s) - JavaScript Help

,I'm creating a form and I just added the ability for the user to click a button and an additional row, if needed.However, the name of each element remains the same as the original row.For example (this is what happens):Original row: Added row: Added row: (this is what I would like)Original row: Added row: Added row: Is there a way to alter the javascript so that with each added row the element names add by 1Here is the javascript: function addRow(tblId) { var tblBody = document.getElementById(tblId).tBodies[0]; var newNode = tblBody.rows[0].cloneNode(true); tblBody.appendChild(newNode); } Here is an example form: Parent Child
VIEWS ON THIS POST

61

Posted on:

Friday 28th December 2012
View Replies!