irkevin
-
Posts
295 -
Joined
-
Last visited
Posts posted by irkevin
-
-
i tried using radio instead of checkboxes, but still no go :S
-
well.. have a look at this code
<script type="text/javascript"> function validate(){ if (document.test.chk.checked == true) { if(document.test.sl.selectedIndex == 0) { location.href = "http://www.mu-anime.com/index.php?id=" + document.test.chk.value; } else if(document.test.sl.selectedIndex == 1) { location.href = "http://www.mu-anime.com/index.php?id=" + document.test.chk.value; } } } </script> </head> <body> <form name="test"> <input type="checkbox" name="chk" value="1">1 <input type="checkbox" name="chk" value="2">2 <select name="sl" onblur="return validate();"> <option>google</option> <option>waaa</option> </select> </form>
For now it doesn't work because i have two checkboxes..
but this one works, when only with one checkbox
<script type="text/javascript"> function validate(){ if (document.test.chk.checked == true) { if(document.test.sl.selectedIndex == 0) { location.href = "http://www.mu-anime.com/index.php?id=" + document.test.chk.value; } } } </script> </head> <body> <form name="test"> <input type="checkbox" name="chk" value="1">1 <select name="sl" onblur="return validate();"> <option>google</option> <option>waaa</option> </select> </form>
I will need this to work even if i have multiple checkbox.. any ideas?
-
well, this will come from a database, so eventually i will have multiple checkboxes depending on number of rows from mysql database..
thanks for any ideas.. cheers
-
Hi,
this seems harder for me. Basically, i have a checkbox, what i want is,
check the checkbox, and use the dropdown to redirect to a specific page.
Anyone got a working example of that plz? or a good tutorial on this? Help plz.
Cheers..
-
wow sweet. I was about to use onkeypress to achieve this. lol
Anyway, thanks again!
have a nice day
-
is it possible,say, when i type in the textbox, to stop the refresh also?
-
Yeps it does work
I added onmouseout="reloadIFrame();" to start the refresh process again.. hope it wont do any harm.
Thanks for your help
-
No there's nothing that cause it to refresh itself. There's only this JS code..
-
did this work for you?
Because here when i use this code, when i move my mouseover the textbox, the page still refresh, even when i type in .. i wonder why it wont accept to function stopReload :S
i made a test like this:
function stopReload ( ) {
alert("I work");
}
when i put my mouse over the textbox, i get a message with 'i work'.. Which mean the function works but it looks like the clearTimeout isn't working.. Any ideas?
-
or another thing which might be best is that when people start typing in the textbox, the refresh stops..
but with my small knowledge in JS, i dont know how to achieve that
-
i already tried this but it didn't work
-
Hi,
what i have is a block of javascript code to refresh contents in an Iframe. So far it works,
Now, on the page containing the iframe, i have a form, what i want is, when i move my mouse over the form, the refresh function should stop.
here is the html
<iframe name="shout" id="shout" src="chat.php" style="overflow:auto;overflow-x: hidden;" frameborder="0" scrolling="yes" marginheight="0" marginwidth="0" height="150" width="100%"></iframe><br /><br /> <form method="post" name="posting" id="posting"> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td colspan="6">Your Message:</td> </tr> <tr> <td colspan="6"><input type="text" name="post" id="post" style="width:300px;" /> <input type="submit" value="Submit Shout" name="submit" /></td> </tr> </table>
The JS code:
<script type="text/javascript"> var milliSecondsToWait = 1000; function reloadIFrame(){ document.frames['shout'].location.href = "chat.php?" + (new Date().getTime()); myVar = setTimeout("reloadIFrame()",milliSecondsToWait); } var myVar = setTimeout("reloadIFrame()",milliSecondsToWait); </script>
Thats it, how do i clear the timeout when i move my mouse over the <input type="text" .. Help plz
-
In which ase you should be able to figure this out yourself
Haha i was sure you would say something like that Good i'll try this ASAP and thanks for your help
-
its a little cms i did myself..
-
well all my links comes from the database. What if i add another link in the database?
-
I have another question if you don't mind.
Right now the links on my website, when i click them, they still points to the dynamic urls.. is there a way so that when i click the links, it shows the nice url in the address bar?
-
ah its working now.. Hava a look at the codes
Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteRule ^completed/([0-9]+)\.html$ /index.php?page=CompletedSeries&id=$1 [L]
This wont cause any further problem i presume?
-
no errors, but the place where the contents should show is blank.
Here is the code
Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteRule ^completed/(.*)\.html$ /index.php?page=$1&id=$2 [L]
-
this is working, thanks for your help but now, my database content isn't showing up with this new url .. Do you know how to fix this?
-
Hi,
I don't know if this is the right place to post this, if it isn't, please move it.
I'm trying to use ur mod-rewrite to make my url look nice. Here is the code
Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteRule ^completed/([0-9]+)/$ /index.php?page=CompledSeries&id=$1 [NC,L]
the dynamic url is http://www.mu-anime.com/index.php?page=CompletedSeries&id=1
and using mod_rewrite, its like this http://www.mu-anime.com/completed/1/, but the only problem is that it doesn't display my images and also, the css isn't working anymore..
Why is it so?
-
Hey, its working it did what i expected. Thanks for your help
the complete code. Had to change strlen($badword) to strlen($row['words'])
<?php function filterBadWords($str) { include("../config.php"); $result = mysql_query("SELECT words FROM badword") or die(mysql_error()); $replacements = "*"; while($row = mysql_fetch_assoc($result)) { $str = eregi_replace($row['words'], str_repeat('*', strlen($row['words'])), $str); } return $str; } echo filterBadWords("your_badword_from_database"); ?>
-
Hi,
I've been searching for hours for a solution and now i'm stuck. I have this code
function filterBadWords($str) { $badwords = array("barwords_goes_here","barwords_goes_here","barwords_goes_here"); $replacements = "*"; foreach ($badwords as $badword) { $str = eregi_replace($badword, str_repeat('*', strlen($badword)), $str); } return $str; }
I created a mysql table, and store the bad words there.
My question is : How do I replace the 'barwords_goes_here', with the data in the mysql table?
-
hehe KingPhilip, its profil !
Actually, its working.. I've dropped the table and create a new one.. Looks like the problem was with the table directory itself!!
Well, hope this solution will work for someone else!
-
<?php $submit = $_POST['submit']; if(isset($submit)) { include("scripts/config.php"); //the path for our logo to be stored $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['logo']['name']); if(move_uploaded_file($_FILES['logo']['tmp_name'], $target_path)) { $logo = "../uploads/".basename( $_FILES['uploadedfile']['name']); } else { echo "There was an error uploading the file, please try again!"; } $title = $_POST['title']; $surname = $_POST['surname']; $name = $_POST['name']; $profile = $_POST['profile']; $company = $_POST['company']; $nature = $_POST['nature']; $position = $_POST['position']; $industry = $_POST['industry']; $addline1 = $_POST['addline1']; $addline2 = $_POST['addline2']; $phone = $_POST['phone']; $fax = $_POST['fax']; $email = $_POST['email']; $website = $_POST['website']; $insert = "INSERT INTO directory(id,title,surname,name,profil,company,nature,position,industry,add1,add2,phone, fax,email,website,path)VALUES('','$title','$surname','$name','$profile','$company', '$nature','$position','$industry','$addline1','$addline2','$phone','$fax','$email', '$website','$target_path')"; $result = mysql_query($insert,$link)or die(mysql_error()); if($result) { echo "Your information was successfully sent to our Directory Database"; } else { "An error occured. Contact the administrator"; } }// end if else { ?> <form method="post" action="app_data.php?id=<?php echo $_GET['id'];?>" enctype="multipart/form-data"> <fieldset> <legend>Directory Details</legend> <ol> <li> <label for="title">Title</label> <select name="title"> <option value="Mr" selected="selected">Mr</option> <option value="Mrs">Mrs</option> <option value="Miss">Miss</option> <option value="Dr">Dr</option> </select> </li> <li> <label for="surname">Surname</label> <input type="text" name="surname" id="name" class="text" /> </li> <li> <label for="name">Name</label> <input type="text" name="name" id="idnumber" class="text" /> </li> <li> <label for="profile">Profile</label> <select name="profile"> <option value="Professional" selected="selected">Professional</option> <option value="Businessman">Businessman</option> </select> </li> <li> <label for="company">Company</label> <input type="text" name="company" class="text" /> </li> <li> <label for="nature">Nature</label> <input type="text" name="nature" class="text" /> </li> <li> <label for="position">Position</label> <input type="text" name="phone" class="text" /> </li> <li> <label for="industry">Industry</label> <input type="text" name="industry" class="text" /> </li> <li> <label for="addline1">Address (Line 1)</label> <input type="text" name="addline1" class="text" /> </li> <li> <label for="addline2">Address (Line 2)</label> <input type="text" name="addline2" class="text" /> </li> <li> <label for="phone">Phone No.</label> <input type="text" name="phone" class="text" /> </li> <li> <label for="fax">Fax</label> <input type="text" name="fax" class="text" /> </li> <li> <label for="email">Email</label> <input type="text" name="email" id="addline2" class="text" /> </li> <li> <label for="logo">Upload your Logo</label> <input type="file" name="logo" id="addline2" class="text" accept="image/jpeg" /> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> </li> <li> <label for="website">Website</label> <input type="text" name="website" id="addline2" class="text" /> without the http:// </li> </ol> </fieldset> <fieldset class="submit"> <input type="submit" name="submit" value="Submit my Information" class="submit" /> </fieldset> </form> <?php } ?> As for the error, it's exactly what is says in the Title. Got error -1 from storage engine Its the first time i got this message. Everything is working well on Local, but on the server it throws the -1 error
checkbox and dropdown to redirect to a page
in Javascript Help
Posted
bump
still no one?