![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Canman2005
-
Posts
669 -
Joined
-
Last visited
Never
Posts posted by Canman2005
-
-
the only other script is the standard ajax one
-
any ideas?
-
the code looks like
var x_offset_tooltip = 5; var y_offset_tooltip = 0; var ajax_tooltipObj = false; var ajax_tooltipObj_iframe = false; var ajax_tooltip_MSIE = false; if(navigator.userAgent.indexOf('MSIE')>=0)ajax_tooltip_MSIE=true; function ajax_showTooltip(externalFile,inputObj) { if(!ajax_tooltipObj) /* Tooltip div not created yet ? */ { ajax_tooltipObj = document.createElement('DIV'); ajax_tooltipObj.style.position = 'absolute'; ajax_tooltipObj.id = 'ajax_tooltipObj'; document.body.appendChild(ajax_tooltipObj); var leftDiv = document.createElement('DIV'); /* Create arrow div */ leftDiv.className='ajax_tooltip_arrow'; leftDiv.id = 'ajax_tooltip_arrow'; ajax_tooltipObj.appendChild(leftDiv); var contentDiv = document.createElement('DIV'); /* Create tooltip content div */ contentDiv.className = 'ajax_tooltip_content'; ajax_tooltipObj.appendChild(contentDiv); contentDiv.id = 'ajax_tooltip_content'; if(ajax_tooltip_MSIE){ /* Create iframe object for MSIE in order to make the tooltip cover select boxes */ ajax_tooltipObj_iframe = document.createElement('<IFRAME frameborder="0">'); ajax_tooltipObj_iframe.style.position = 'absolute'; ajax_tooltipObj_iframe.border='0'; ajax_tooltipObj_iframe.frameborder=0; ajax_tooltipObj_iframe.style.backgroundColor='#FFF'; ajax_tooltipObj_iframe.src = 'about:blank'; contentDiv.appendChild(ajax_tooltipObj_iframe); ajax_tooltipObj_iframe.style.left = '0px'; ajax_tooltipObj_iframe.style.top = '0px'; } } // Find position of tooltip ajax_tooltipObj.style.display='block'; ajax_loadContent('ajax_tooltip_content',externalFile); if(ajax_tooltip_MSIE){ ajax_tooltipObj_iframe.style.width = ajax_tooltipObj.clientWidth + 'px'; ajax_tooltipObj_iframe.style.height = ajax_tooltipObj.clientHeight + 'px'; } ajax_positionTooltip(inputObj); } function ajax_positionTooltip(inputObj) { var leftPos = (ajaxTooltip_getLeftPos(inputObj) + inputObj.offsetWidth); var topPos = ajaxTooltip_getTopPos(inputObj); var tooltipWidth = document.getElementById('ajax_tooltip_content').offsetWidth + document.getElementById('ajax_tooltip_arrow').offsetWidth; ajax_tooltipObj.style.left = leftPos + 'px'; ajax_tooltipObj.style.top = topPos + 'px'; } function ajax_hideTooltip() { ajax_tooltipObj.style.display='none'; } function ajaxTooltip_getTopPos(inputObj) { var returnValue = inputObj.offsetTop; while((inputObj = inputObj.offsetParent) != null){ if(inputObj.tagName!='HTML')returnValue += inputObj.offsetTop; } return returnValue; } function ajaxTooltip_getLeftPos(inputObj) { var returnValue = inputObj.offsetLeft; while((inputObj = inputObj.offsetParent) != null){ if(inputObj.tagName!='HTML')returnValue += inputObj.offsetLeft; } return returnValue; }
-
Hi all
I have a tooltip script and I'm getting an error
ajax_showTooltip is not defined
though firebug.
if I look at the scripts function, I get
function onclick(event) { ajax_showTooltip("contentdeletebox.php?id=109", this); return false; }
the HTML im using to kick off that javascipt function is
<a onClick="ajaxLoader('content.php?edit=<?php print $row['id']; ?>','content');">click</a>
It works fine locally on my computer, but when uploaded to its home server, the error appears and the tooltip is disabled with only that error to go on.
any ideas anyone?
thanks
-
thanks all for the help
-
Hi all
I have a URL which looks like
http://www.domain.com/165-products-electronic-music.html
Is it possible to grab a section of that URL and set it as a variable
the part I want to grab is the number, so with the example above it woud be
165
or of the URL was
http://www.domain.com/765-apple-desktop.html
it would grab
765
Any help would be great
thanks in advance
ed
-
Top man, thanks dude
-
yes please, specifically have to be 5 months or less left
-
Hi all
I have a field called `expiry_date` and I want to run a QUERY that grabs all records where there is 5 or less months left until the `expiry_date` has been reached.
Does that make sense? Can anyone help?
Thankd very much
Ed
-
top job thanks
-
Okay, but if I do
$rr = array(); $rr[] = 2; $rr[] = 4; $randomnumber = array_rand($rr); print $randomnumber;
it outputs only
0 and 1
where it should be outputting just
2 and 4
any ideas?
-
I still get 0 returned as a random number, the code used now is
$rr = '1,2,3,4,5,'; $exploded = explode(",", "$rr"); $rand = rand(0, count($exploded)-1); print $rand;
any ideas?
thanks
-
I have tried using
$exploded = explode(",", "$rr"); $rand = rand(1, count($exploded)); echo $exploded[$rand];
which kinda works, it displays a random number, but sometimes returns nothing (although it could be 0 it's returning)
any ideas why it would do that?
-
can I not do something like
rand($rr)?
any help would be great
-
Hi all
I have the following
if(getramdoms(2) != 0) { $rr = $rr. '1,'; } if(getramdoms(44) != 0) { $rr = $rr. '2,'; } if(getramdoms(99) != 0) { $rr = $rr. '3,'; } if(getramdoms(132) != 0) { $rr = $rr. '4,'; } print $rr;
which produces something like
1,3,4,
My question is, how can I randomly pick one of those values and set the random value as
$randomnumber = ?
any help would be great as im totally stumped
thanks very much for any help
-
-
Hi all
I am doing
$rand = rand(1,655);
how can I do that but make sure it excludes number 300
thanks
-
SELECT user_id, COUNT(user_id) AS count FROM members WHERE type = 'j' GROUP BY user_id;
worked great thanks
-
any ideas anyone? can only seem to get 1 row returned
-
That just seems to return one row, any ideas?
-
Hi all
I have a table called `members` which looks like
id
user_id
type
I want to do a simple
SELECT `user_id` FROM `members` WHERE `type` = 'J'
My question is.
How can I get the QUERY do the ORDER BY most popular, using the `user_id` and LIMIT it by 3
So if there are
9 rows with `user_id` value set as 3
28 rows with `user_id` value set as 7
2 rows with `user_id` value set as 13
55 rows with `user_id` value set as 18
then the QUERY would return `user_id` in the following order
`user_id`
18 (as it has 55 rows)
7 (as it has 28 rows)
3 (as it has 9 rows)
Any help would be great, been hunting for an answer for the last 4 hours with no luck
thanks very much in advance
dave
-
thanks very much
-
hi
nope that didnt seem to work, any other ideas? I tried <> and also !=
-
Hi all
I have 2 tables, one called `users` which looks like
id
name
and the other table called `user_list` which looks like
id
user_id (this field ties into the field `id` in the `users` table)
type
how can I do the following
1: select all rows from `users`
2: but ignore any rows from the `users` table if they appear in `user_list` (under `user_id`) and also have the `type` set to the value "X"
Sorry, hard to explain, hope it makes some sense
Any help would be great
thanks
dave
javascript is not defined
in Javascript Help
Posted
really sorry, that was the wrong code for the link which is being clicked, the correct code is
do you need anymore info or code?