Jump to content

wispas

Members
  • Posts

    71
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wispas's Achievements

Member

Member (2/5)

0

Reputation

  1. I have attached a file with a date picker script that i ahve been using and working on. Everything works perfectly the way i want it to work, However when the date is inserted into the text field it comes out as '2011-03-01' Now.. i need it in this way as i am collecting this information and sending it to my MySQL query, but is there a way i can change it so it visually displays as '1st March 2011', but still go into the database as '2011-03-01' so i can continue to do my query as well as making it visually look good with some sort of JavaScript date formatting. Can anyone please take a look when they have a momemt. Thanks! [attachment deleted by admin]
  2. I want to set up a Javascript Function with a OnClick without the use of a form. Heres a simple Checkbox: <input type="checkbox" name="checker" id="checker" /> Check the button is clicked. <br /> <br /> <a href="#" onclick="meClick()">Submit This</a> I want to add a function to see if checkbox is checked upon clicking the link: <script type="text/javascript"> function meClick(){ if(document.checker.checked == true){ alert("Hooray... checkbox is clicked"); }else{ alert("Nah... its not working"); } } </script> But this is not working... please help... been driving me mad for hours!!!!
  3. Hi, I have a form on my page. <form id="advanced_search" name="advanced_search" method="POST" action="<?php echo $PHP_SELF;?>"> </form> Form submits with a regular button <input type="submit" name="advSearch" id="advSearch" value="Search" /> And i have a detector to see where submit button has been clicked on my next page: if(isset($_POST['advSearch'])) { echo "Button was clicked"; } However, I wanted a custom button for better styling and control. So i replaced my regular button with this now which uses javascript to submit the form. <a class="button" href="javascript:document.advanced_search.submit()" name="advSearch" id="advSearch"><span>Search</span></a> Now the isset($_POST) is not working anymore. Can anyone help please?? Thanks!
  4. I have a page with a link: <a href="grab.html?myParameter=hotel">Show me the Parameter</a> On 'grab.html' i want to display the 'myParameter' prameter which should be "hotel" Can anyone show me howi can display the parameter from the URL please. Thanks!
  5. worked like a charm... thank you so much"
  6. So i am bringing in two words from a form... but just to keep things simple... lets says i have: GB95/Andrew I want to use PHP to eliminate the '/' and then put the two words 'GB95' and 'Andrew' into seperate variables... does anyone know how i can achieve this?
  7. Anyone know how to use javascript to align div in the center?
  8. I have put together this code that will change the background color of my div container... which works very well... but if i had another div that wanted to do the same thing... is there a way i can make this code reusable and not have to copy and paste the entire function. Thanks! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- #myDiv { background-color: #33CCFF; width: 300px; height: 300px; } --> </style> </head> <body> <script type="text/javascript"> var gothink = 0; function gothink_function(element) { if ( gothink == 0 ) { document.getElementById('myDiv').style.backgroundColor = '#D4DBE7'; gothink = gothink + 1; // alert(gothink) } else if ( gothink == 1 ) { document.getElementById('myDiv').style.backgroundColor = '#D49997'; gothink = gothink - 1; // alert(gothink) } } </script> <div id="myDiv">Content for id "myDiv" Goes Here</div> <p>Click one:</p> <p><img src="images/close_btn.jpg" width="40" height="40" onclick="alert(gothink)" /></p> <p>Click two:</p> <p><img src="images/round_red_close_button_5095.jpg" width="200" height="200" onclick="gothink_function()" /></p> </body> </html>
  9. that worked so well... exactly what i was looking for... thank you very much!
  10. i have a script that expands and collapses a div tag when the a:link has been clicked. i have added an extra div at the bottom called status and wanted it to display some words as to whether the box is expanded or collapsed; can anyone help me with this... im guessing its adding some code into the javascript that i already have. <html> <head> <title>Show/Hide Element</title> <script type="text/javascript"> function showHide(div){ if(document.getElementById(div).style.display == 'none'){ document.getElementById(div).style.display = 'block'; }else{ document.getElementById(div).style.display = 'none'; } } </script> </head> <body> <a href="#"><div id="filter" onClick="showHide('filtersearch');">Filter Search Results</div></a> <div id="filtersearch" style="display:none;">Put content here</div> <div id="status"></div> </body> </html>
  11. I have a website that is PHP and displays information from a MySQL database... i simply want to add rss news feeds onto my website but put the RSS into a MySQL database so only certain pages will display the feed. Any clue on how this can be achieved...
  12. I have a lists of hotel names in a drop down menu: <?php // Connect database include("connectdb.php"); $sql="SELECT hotel_id, hotel_name FROM hotel ORDER BY hotel_name ASC"; $result=mysql_query($sql); $options=""; $id_array = array(); $hotel_name = array(); while ($row=mysql_fetch_array($result)) { $id_array[]=$row["hotel_id"]; $hotel_name[]=mysql_real_escape_string($row["hotel_name"]); $options.="<option VALUE='".$row["hotel_id"]."'>".$row["hotel_name"]."</option>"; } ?> <select name="hotel_name" size="1" style="background-color:#FFFFD7"> <?php echo $options; ?> </select> I want to display a default hotel based on its value... say i want the drop down to be on hotel id 35 when the page loads... does someone know how i can achieve this... ?
  13. I have this SQL query at the moment: SELECT * FROM city INNER JOIN packages ON packages.city_code = city.city_code WHERE city_id='$id'; I have another table i want to inner join called hotel. Does anyone know how to add this into the SQL query above.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.