User Profile
Collapse
-
just a tip: you can do xxx += zzzzz, saves some space -
not sure if I got you correct, I just added this to the button
that worked fineCode:if(event.currentTarget==event.originalTarget)
Leave a comment:
-
Event fires wrong input field
Hi, I'm having problems with a form, when pressing enter in any field, it fires an event as if I would press a button. when I check in Firebug it shows me that the currentTarget is the button.
How can I change this strange behaviour? -
input field in movable div looses select behaviour
Hi I've started to create movable divs with forms in them. When your grab
the div you can move it. The bad thing is that you actually can move the form when having the cursor in the one of the input fields. To remove this behaviour I remove the event listener that is attached to the div.
The problem then is that I loose the normal input functionality for selecting text.
Anybody knows how to solve this problem?
... -
solved the problem, the code was ok, the problem was that the empty form was loaded twice (after populating it)Leave a comment:
-
I tried an different approach, I forgot to say that it was in html so probably that's why there where problems. with () inside a function call.Leave a comment:
-
passing function with argument to function?
Hi I'm getting some errors, xxx is not a function.
I'm sending a function as an argument to a funtion:
Code:function s(x) { .... } function t(a,b,c) { ....... } When passing s into t I get the error s is not a function [CODE] t(y,ys,s('45')) or t (y,ys,s(45))
[/CODE] -
var x = document.getEle mentById('the_h idden_id');
x.value = xxxx;Leave a comment:
-
actually when accessing the page on a old computer I see that the list is populated but then blanked when exiting the loop.Leave a comment:
-
sorry for the code, I use a lot of functions and they are all in separate js files
that are included before the body tag
What I've found out is that:
gives different answers after code execution:Code:alert(intothis.options.length); //var intothis = document.getElementById("sk") alert(document.getElementById("sk").options.length);
the first alert gives 8...Leave a comment:
-
loading form dynamically doesn't work
Hi
I'm trying to load a form into a div (that's hidden and then set to visible) = the form gets a page and stores it inside.
I activate it by pressing a button.
Then the div will fill in some values in the form elements that it has.
however this doesn't work.
the page is loaded but document.getEle mentById doesn't find it. When I look in
the HTML it's all there.
...Code:var
-
1 check the parentNode of the selectbox, probably a td
2 check it's parent,
3 get the row then use the rowIndex....Leave a comment:
-
Alert "fixing" problems?
Hi, I've been struggling with AJAX for a while and notice that if I add the alert("xxx")
in my code it always makes the code work.
I'm using divs where I put the output from the server and then handling the info from there. Sometimes the JS doesn't find the newly inserted tags (divs with id), only when I add the alert command before it. It's kind of strange. Aswell as when enabling FireBug. So I guess that FireBug... -
thanks for the link, however it didn't really help.
made it work but I'm not really sure why it works now. added onclick on the button, still submit the form. maybe it was because the form was empty that it didn't do anything. added onclick on the button and action, but like I said, I have no clue why.Leave a comment:
-
Javascript mailto - neither subject or body ends in the mail (FF?)
Hi, I tried to do this:
However the mail only shows the recipient and not the rest of the values.Code:mailstr = "mailto:recipient@domain.com?subject=subjecextract&body=assg"; mailform = document.getElementById("mailform"); mailform.setAttribute('action',mailstr); mailform.submit();
Anybody knows what I do wrong or is it only Firefox? -
variables in javascript or as $_SESSION?
Hi I'm trying to use $_SESSION in my AJAX application.
However this gives me strange data, the $_SESSION variable seems to
change during page load. in the end of the page it's the earlier value that shows.
I set the $_SESSION[id] with this
...Code:function setId(id) { try{ var obj; obj = document.getElementById("sid"); var serverPage = "setid.php" + "?id="+id; -
I have two queries that I want to join. But not in the normal way since i only want one row per id. I would like to use the row for creating a list.
what I've tried to show is the result from the queries so that you might understand my problem.Leave a comment:
-
join query with transpose in MySQL?
Hi
I'm wondering how to make these questions:
Code:SELECT * FROM skills WHERE skill='5' AND skill='4' | id | skill | level | 3 | 5 | 1 3 | 4 | 1 4 | 5 | 2 4 | 4 | 1 1 | 5 | 1
...Code:SELECT Id, skill*level as total, SUM(level) as rating FROM skills WHERE skill='5' OR skill='4' GROUP BY Id ORDER BY rating
-
I'm sorry: the options are added with javascript:
...Code:function setskills(thevalue, id) { var already = false; try{ theObj = document.getElementById("skills"); var optn = document.createElement("OPTION"); optn.text = thevalue; optn.value = id; for(i=0; i<theObj.options.length; i++) { if(theObj.options[i].value == id)Leave a comment:
-
added this to getvalues but I cant get the info in $_POST['skills[0]']:
Code:if(fobj.elements[i].name == "skills") { for(var j=0; j<fobj.elements[i].options.length;j++) { str += fobj.elements[i].name +"[" + j +"]=" + escape(fobj.elements[i].options[j].value)+ "&"; } }Leave a comment:
No activity results to display
Show More
Leave a comment: