![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
nogray
-
Posts
930 -
Joined
-
Last visited
Posts posted by nogray
-
-
use <tr onclick="location.href='.......';" onMouseOver....
If it doesn't work, try to put the onclick on all the td tags
-
Hi Guys,
When I tried to visit phpfreaks.com I get redirected to the forums right away? Is the site down or is there any issues? I tried with 2 different browsers (IE, Firefox) to make sure it's not a cookie thing.
-
how are you using your title? Is this an AJAX page? if not, it's a simple title tag
<title>My Title Here</title> or <title><?PHP echo $some_variable;?> - my title</title>
If the page is using Ajax to load the content, you'll need to make an alternative page so search engines can spider that page.
-
Google can't read JavaScript. Use PHP or similar approach.
-
You can't include HTML directly in your PHP, you need to use echo
this <table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"> should be this echo '<table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">'
-
-
an easy way to do it is by using hidden input fields
For example, the first page has a field called "FirstName" and the user input "Smith"
second page will have
<input type="hidden" name="FirstName" value="Smith" />
and so on.
-
no, it won't affect anything, just standard form stuff.
-
input type="image" always passes in the x and y coordinate where the user clicked.
-
/" should be \" in the echo line
-
http://us2.php.net/manual/en/ref.session.php
First Page session_start(); $_SESSION['something'] = 'hello'; Second page session_start(); echo $_SESSION['something'];
-
event.srcElement is IE only property. You'll need to pass the "tr" object to the function in your mouseover and out events
<table onMouseOver="changeto(this, '#5D7DA6')" onMouseOut="changeback(this, 'black')" > .... function changeto(tr, highlightcolor,textcolor){ tr.style.backgroundColor=highlightcolor }
-
In firefox, click on "Tools" (next to File, Edit, View...) and select "Error Console" or simply download firebug.
-
time() will return the number of seconds, so you can easily subtract 4 hours (in seconds) to get 4 hours ago
$today = time() - (4*60*60);
-
can you post the URL, or the complete HTML file.
-
you'll need to give more details on what's not working. But since you are making a grid, make sure to add a tbody to the table, otherwise, nothing will show on it.
Example
var table = document.createElement('table'); var tbody = document.createElement('tbody'); table.appendChild(tbody); var tr = document.createElement('tr'); tbody.appendChild(tr); var td = document.createElement('td'); td.innerHTML = 'hello'; tr.appendChild(td); document.body.appendChild(table);
If you use this example, run it after the page loads.
-
not sure what calendar you're using. However, if you use the NoGray Calendar http://www.nogray.com/calendar.php you can use the onSelect event to show anything
example
<script> var cal = new Calendar('holder', 'toggel', {inputField:'date', onSelect:function(){loadpic();}}); </script> <input type="text" name="date" id="date" /> <a href="#" id="toggel">Open</a> <div id="holder"></div>
-
I am not very familiar with JQuery, but you can do something like this
When the user click on a toggle link, the script will slide down the div and save a cookie with the toggler id (importent)
next time when the page load, check if the cookie is saved. If so, fire the toggler click event (that's why saving the toggler id is importent). Make sure it's not the first toggler, otherwise it might close it
-
function whatever(str){ var string = str.substring(str.indexOf("(")+1,str.indexOf(")")); }
-
Do you have spaces before the & sign? If so, remove any spaces that's before the & sign in the URL, also I belive google has a full JavaScript API that you can use
-
$p = &$_REQUEST['p']; $p = preg_replace('/\W/g', "", $p);
or
$p = &$_REQUEST['p']; $p = str_replace(array("?"," ",",",";","."), "", $p);
Not tested
-
Why did you redirect the styles and images folders? When you do the redirect, nothing will be accessible from the browser, so you shouldn't redirect the style, images, or any files that is used in the page.
to filter the input, you can do something like this (to filter anything that is not in a-zA-Z0-9_
$p = preg_replace('/\W/g', "", $p);
or
$p = str_replace(array("?"," ",",",";","."), "", $p);
Not tested
-
of course you need test and make sure everything is safe. Also, make sure none of the files in the navigation folder display anything important. Finally, filter the input for "?" or illegal characters (like spaces, commans, etc...)
If someone wants to view the navigation links by themselves, I don't see the harm in that
-
You can add this to your .htaccess (in the public_html folder) to block direct access to the navigation folder
redirect /navigation/ http://www.my-domain-name/
username validation?
in Javascript Help
Posted
Try something like this