Im trying to rewrite a link with a href function. I need to parse a query string within it ('+tid')
But all attempts Have falied. The current onclick/ link function - <a href="java script:who_posted();">Who Posted?</a>
-
is attached to my forums 'replys' number colum in forum veiw' {i have no direct access}
it appears in the staus bar on hover as - <a href="java script:who_posted(428);">Who Posted?</a>
where '428 is the tid (topic id).
I want to write a href link to do this (elsewhere in html) and add the tid of whatever topic
the page is currently on.
see site for clarification (click the 'replies' number next to a title)
http://inny.ipbfree.co m/index.php?showf orum=1
click on any topic, and see a mail href link above. I want to add the who_posted function href there, so that whatever topic your on, the who posted box will work.
code is {no direct access} - <script language='javascript' type="text/javascript">
-
<!--
-
function who_posted(tid)
-
{
-
window.open("http://inny.ipbfree.com/index.php?s=&act=Stats&CODE=who&t="+tid, "WhoPosted", "toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300");
-
}
-
//-->
-
</script>
-
Im not sure to write the new link to include the extra function of adding the topic id (tid)
i tried a few variations on - <a href="java script:window.open("http://inny.ipbfree.com/index.php?s=&act=Stats&CODE=who&t="+tid, "WhoPosted", "toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300");>Who Posted?</a>
-
-
and i thought it might be the quotes, i tried - <a href="java script:window.open('http://inny.ipbfree.com/index.php?s=&act=Stats&CODE=who&t='+tid, 'WhoPosted', 'toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300')";>Who Posted?</a>
No joy
then i tried 2 functions - <a href="java script:who_posted(tid);window.open('http://inny.ipbfree.com/index.php?s=&act=Stats&CODE=who&t='+tid, 'WhoPosted', 'toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300')";>Who Posted?</a>
-
What am I doing wrong?
please assist?
12 2974 hsriat 1,654
Recognized Expert Top Contributor
Try this: ... &t='+tid+', ...
Ok I tried this but I got page not found - <a href="java script:window.open("http://inny.ipbfree.com/index.php?s=&act=Stats&CODE=who&t='+tid+', "WhoPosted", "toolbar=no,scrollbars=yes,resizable=yes,width=230, height=300");>Who Posted?</a>
hsriat 1,654
Recognized Expert Top Contributor - <a href="java script:window.open('http://inny.ipbfree.com/index.php?s=&act=Stats&CODE=who&t='+tid+', WhoPosted', 'toolbar=no,scrollbars=yes,resizable=yes,width=230, height=300');">Who Posted?</a>
Be careful while using quotes.
It still gives 'page not found' I dont get it! :(
There appears to be an extra function involved? -
<script language='javascript'>
-
<!--
-
function bog_off()
-
{
-
var tid = '1143';
-
var fid = '2';
-
-
opener.location= 'http://inny.ipbfree.com/index.php?' + 'showtopic=' + tid;
-
self.close();
-
}
-
//-->
-
</script>
hsriat 1,654
Recognized Expert Top Contributor
Try this... - <a href="javascript:window.open('http://inny.ipbfree.com/index.php?s=&act=Stats&CODE=who&t='+tid, 'WhoPosted', 'toolbar=no,scrollbars=yes,resizable=yes,width=230, height=300');">Who Posted?</a>
I made a good mistake in the earlier one, although I was telling you to use quotes carefully.
Harpreet
Unfortunately This is not working either. I just dont understand it, Think it needs to add 'fid' (forum id) aswell, see extra function i found above.
hsriat 1,654
Recognized Expert Top Contributor
Unfortunately This is not working either. I just dont understand it, Think it needs to add 'fid' (forum id) aswell, see extra function i found above.
I tried to do that on your website.
Altho I was scared from the snake out there, but what I suggested last time worked fine when I replaced tid with 1066. So I guess the value of tid is not being passed properly.
Type this in your address bar, press enter. It will work. - javascript:window.open("http://inny.ipbfree.com/index.php?s=&act=Stats&CODE=who&t=1066", "WhoPosted", "toolbar=no,scrollbars=yes,resizable=yes,width=230, height=300");
Try to provide the tid to each link at server side by changing your PHP.
Thanks Mate, but I dont have access to the php.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Jesse |
last post by:
I have a string with the following information.
$myString = "This is my example string please. Please visit
http://www.mylink.com . More example text goes here. another link
http://www.link2.com . more text.. blah..";
What I'm wanting is a function to return the following string :
$myString = This is my example string please. Please visit <a
href'http://www.mylink.com'>link</a> . More example text goes here.
|
by: Mark Anderson |
last post by:
Sorry if this is a rookie mistake... I've been through all the FAQs and the
books I have but I can't see the mistake so I guess it's something simple
<g> - I'm an occasional JS user.
I've got some code (in an external JS file) attached to a number of links
off a query result page. The code it checks if there are any ticked items on
the page and adds them to a lightbox (cart) before going the next called
result page. The idea is to stop...
|
by: Dennis M. Marks |
last post by:
I am looking for a javascript function that will parse a query string.
Parameters are passed in the url: url?a=3&c=5&etc
An array is returned that uses the variable name as the index.
array=3
array=5
etc.
--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
|
by: Phil Powell |
last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href
= document.location.href.substring(0,
document.location.href.indexOf('?'));
if (document.location.href.indexOf('#') >= 0) {
document.location.href = document.location.href.substring(0,
document.location.href.indexOf('#')) + '?' + newUrl;
} else {
document.location.href = document.location.href + '?' + newUrl;
}
|
by: Dr. Oz |
last post by:
Hi,
I am trying to read in a query string from one page and build a link to
another page based on the query string.
Here's the code I am using to read in the query string:
<script "text/javascript">
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
| |
by: Ken Bush |
last post by:
How can I write an update query that removes part of a field? Like if I
have a field with values such as 8/3/68 (a birthday obviously) and I need
to put values in a new column but I need everything after and including the
final / removed to end up with simply 8/3
|
by: Ian Davies |
last post by:
Hello
I have found the following script php/java for dynamic menu lists. Where a
selection from the first updates (filters items in) the other. I have
modified it for my tables.
However I am getting an error
Parse error: parse error, unexpected T_VAR in
e:\domains\i\iddsoftware.co.uk\user\htdocs\QuestionDB\Questions.php on line
42
|
by: Dennis |
last post by:
I'm sure there is an easy way to do what I want but I'm failing to find
it...
I have a single web page with links back to itself with set query
strings...
href="?data=x"
href="?data=y"
|
by: TF |
last post by:
This group came through for me last time so here we go again. My page
shows paint colors, brand name, product code, etc in a gridview with
the background matching the paint color. Several links on the page are
used to call itself with querystring values for brand, thinner,
finish, etc. The page must show all colors if the querystring is
empty and filter out records that don't match the querystring value
when it's not. I've tried building...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |