15,698 Topics

Member Avatar for
Member Avatar for OsaMasw

Hi there fellow daniweb programmers I have problem in running function in javascript <script type="text/JavaScript"> function toggle() { var e = document.getElementById('target_<? echo $id; ?>'); e.style.display = 'none'; } </script> I have button that generated in php code so its repeating itself <li><a id="target_<? echo $id; ?>" href="like.php" onclick="toggle()"><img src …

Member Avatar for OsaMasw
0
3K
Member Avatar for andyhunter

how do you manually add it when the link is www.somesite.com which i would want it to be added to index.html ? function setActive() { /*current page function*/ $('#menu a').each(function(index) { if(this.href.trim() == window.location) $(this).addClass("current"); }); this works for any pages that are in the navigation menu.

Member Avatar for stbuchok
0
94
Member Avatar for mousa.khaleel13

Anyone can please help in this. I need to assign a path for a text file in a variable to be shown later on in html here's my code: <html> <head> </head> <body> <!-- Header --> <header> </header> <!-- End Header --> <!-- Main --> <section id="main"> <script type="text/javascript"> var …

Member Avatar for AleMonteiro
0
4K
Member Avatar for daniel36

can anybody tell me event name for check box for using in jquery.such as for drodown it is 'onchange' .thank you.

Member Avatar for daniel36
0
66
Member Avatar for gon1387

Hi Everyone, I've been looking for good javascript projects to join. Are there any projects you can advice? I've researched a lot. (with the help of Google. :D) But would also love to get advices from people who have/had worked at an opensource project here. I would also love to …

Member Avatar for gon1387
0
282
Member Avatar for axymak

Friends I want to show results on my website from the other website. It uses the URLS to shows the result as for Roll number 123123 the results page is www.remotesite.com/B/Res/123123.html like wise for the number 124124 the results page is www.remotesite.com/B/Res/123124.html I want to add such a javascript in …

Member Avatar for pritaeas
0
204
Member Avatar for 4Dante

Hi, I've looked online for a few days but haven't been able to find an adequate solution. I'm just trying to use javascript to validate that a password doesn't contain user data (first name, last name, etc...) I really thought it would be simple. Here is what I'm using: function …

Member Avatar for 4Dante
0
207
Member Avatar for ThePythonNoob

Hi, I am trying to make a click counter. The prolem is the onClick part in button code. If i made it so it was "click();" and placed the var clicks into the function click then it would kind of work. But when I pass a variable into it.. it …

Member Avatar for ThePythonNoob
0
151
Member Avatar for piso_mojado

running into an issue haven't seen this before where content during the encoding and decoding of an image looses byte count. I have an app taking the photo image and sending the file via: ----------------------- byte[] imageBytes = new byte[(int) imageFile.length()]; inputFile = new RandomAccessFile(imageFile, "r"); inputFile.read(imageBytes); String base64String = …

0
183
Member Avatar for RenanLazarotto

Hello guys! I'm trying to change an element background color when my mouse goes over another element. As far as I know CSS, this seems to be impossible to do only with CSS, so what kind of js I need to do this? My knowledge in JavaScript it too limited …

Member Avatar for RenanLazarotto
0
2K
Member Avatar for abby.delacruz.927

Guys help me with this code. I don't know what to do. I have 2 div the 1st is in the left and it has a button and on the other div is to show/display when I click the button on the 1st div. <html>// this is my index.html <head><title> …

Member Avatar for JorgeM
0
317
Member Avatar for rotten69

Hi there, I'm reading a book on Javascript and trying to understand a few concepts that are about hasOwnProperty(), propertyIsEnumerable() and isPrototypeOf(). I don't understand when and how these methods are used. That would so appreciated if someone can explain them to me in a nutshell. This example is from …

Member Avatar for rotten69
0
177
Member Avatar for ThePythonNoob

Hi, I just started javascript. I want to put a radio button into an array I have done this so far: var blocks = new Array("<input type="radio" name="" value="1">","2","3","4","5","6","7","8","9"); however this isn't working. I suspect that I need to change the 'mode' to html somehow? <html> <head></head> <script type="text/javascript"> // …

Member Avatar for AleMonteiro
0
222
Member Avatar for vizz

How to fix position of first div at **center** and add more div **around first div** as per requirement, to, **left, right, top and bottom** and scroll to that div using fix navigation at top of page

Member Avatar for vizz
0
75
Member Avatar for arcticM

I'm trying to use remote data source autocomplete, I have a code that works. I'm returning an id column from a db table. what I'm trying to do is to have the autocomplete display 2 values from the table row, for example id1 - this is id 1 id2 - …

Member Avatar for arcticM
0
203
Member Avatar for Octet

Helo Daniweb, I am in the process of building a WYSIWYG text editor, in an attempt to understand how they work. I am a novice at JavaScript, however what I have learnt so far seems to make sense. The problem comes when I try and change the text rapidly, if …

Member Avatar for Octet
0
476
Member Avatar for Zaina jee

I want to display divisors of a number in a text box using loop. But their is some error in my program.I need help to correct it. `<html> <head> <script> function CheckDivisors() { number=parseInt(document.divfrm.num.value); d=1,sp="\t"; do { if(number%d==0) { document.divfrm.div.value=d; document.divfrm.div.value=sp; } d++; } while(d<=number/2); } </script> </head> <body> <form …

Member Avatar for Zaina jee
0
171
Member Avatar for unau2k

I want to change an image in another place on my site when I click on the page title. I have tried doing different codes five ways to Sunday and cannot figure it out. Can someone help? Here's my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta …

Member Avatar for AleMonteiro
0
389
Member Avatar for opawix

how can i integrate the codes to make it loop infinte sir/ma'am? i'am a total newbiew, thanks in advance. :D <script langauage="javascript"> col=255; function fade () { document.getElementById("fade").style.color="rgb("+ col + "," + col + "," + col + ")"; col-=5; if(col>0) setTimeout('fade()',25);} </script>

Member Avatar for JorgeM
0
121
Member Avatar for moone009

I found this example online and cannot figure out why it will not work. I was wondering if anyone could help me figure out why this code does not work ive spend a few hours tinkering with it and no luck. I learn best by example and just basically need …

0
123
Member Avatar for Violet_82

Hi all, I have recently built a website using wordpress and I have noticed that wordpress adds some classes to my html tags automatically. I asked for support in their forum, but nobody got back to me, so I was hoping somebody could she some light on this? SO I …

Member Avatar for Violet_82
0
241
Member Avatar for albertkao

How to display text string with Javascript on screen? This is my test page: [CODE]<html> test <script type="text/javascript"> docwrite(1); document.write('hi'); docwrite('hello'); </script> docwrite(2); <script type="text/javascript"> function docwrite(x) { document.write(x); } </script> </html> [/CODE] I saw only "test docwrite(2);". I want to see "test 1 hi hello docwrite(2);" with " 1 …

Member Avatar for priakant
0
3K
Member Avatar for lse123

how in a canvas HTML5 I can add more than one image,... is any stack order? how many images overlap and seem all or part of them, can have in canvas? canvas or an image can saved in localStorage html5?

Member Avatar for pritaeas
0
93
Member Avatar for minitauros

Hey there. The situation is like this: 1. The user clicks a button. 2. Tooltip pops up. 3. The user clicks the button again OR the user clicks anywhere outside the tooltip. 4. The tooltip is removed. Now I can get either of the events described in step 3 to …

Member Avatar for minitauros
0
3K
Member Avatar for rambharath89

Can any tell me ReadOnly Status os Excel Driver... I want to read from and write into Existing Excel Sheet.. Am using ADODB.Connection and ConnectionString as "DRIVER=Microsoft Excel Driver (*.xls);DBQ=FilePath;ReadOnly=1;" in javascript.. Here ReadOnly=1 indicates the connection to be established in read only mode.. If I put ReadOnly=0, then Is …

Member Avatar for pritaeas
0
220
Member Avatar for rajilakshmi

I want to split the image equaly by vertically. This images should be in slideshow. Then give the link to that two parts. Left side link is for moving to previous slideshow and right side link is for moving to next slide. Anyone can help? Please!

Member Avatar for rajilakshmi
0
81
Member Avatar for McLaren

Hello I have a code and on page load it gets clicked, I see by alert for example. The problem is it send not needed ajax request. Its hard to find origin clicker by hand. Is there a way programically detetc who clicked the class? //Delete all event from betting …

Member Avatar for McLaren
0
138
Member Avatar for f_atencia

I have an ASP page written in JavaScript that writes a CSV file into a database table. while (!oFile.AtEndOfStream) { var s = oFile.ReadLine(); var sArr = s.split(","); var sPostcode = String(sArr[0]).replace(re, ""); var sSuburb = String(sArr[1]).replace(re, ""); ...stored procedure to write into database... } It works fine for smaller …

Member Avatar for f_atencia
0
153
Member Avatar for klemme

I have this function which fades in a main menu when scrolled more than 100px. $(document).ready(function() { $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('#main_nav_fixed').fadeIn(500); } else { $('#main_nav_fixed').fadeOut(500); } }); }); It works fine, but if the user scrolls fast up and down lets say 10 times, and …

Member Avatar for gavinflud
0
129
Member Avatar for dannybarh

am using jquery.min.js to insert a form data into myqsl db.I just added a captcha script i got online,but i keep geting an [ Notice: Undefined index: secretNumber in D:\xampp\htdocs\mim\insert.php on line 25 ].I tryed all i know ,nwwd your help. javascript code: <script type="text/javascript"> > > $(document).ready(function(){ > //Get …

Member Avatar for diafol
0
204

The End.