Hi Guys,
I think this will be very easy for you experts but I am a real novice with scripts.
I have a text link {LINKONLY}Book</a> where {LINKONLY} is defined in the site. I wish to change to a button with onclick function but do not know where the {LINKONLY} needs to go in the script.
<input name="details" type="submit" class="button" id="details" onclick="?????" value="details" />
Any help gratefully accepted
David
7 1558 hsriat 1,654
Recognized Expert Top Contributor
[html]<button name="details" class="button" id="details" onclick="window .location = '{LINKONLY}';"> Details</button>[/html]
If you have to use it for submit button, add the link to the action attribute of the form tag.[html]<form action="{LINKON LY}" name="f" method="get | post">[/html]
PS: I am considering {LINKONLY} something like abcdef.htm
[html]<button name="details" class="button" id="details" onclick="window .location = '{LINKONLY}';"> Details</button>[/html]
If you have to use it for submit button, add the link to the action attribute of the form tag.[html]<form action="{LINKON LY}" name="f" method="get | post">[/html]
PS: I am considering {LINKONLY} something like abcdef.htm
Hi,
Thanks for the reply but its not correct. The {LINKONLY} is not a link to a standard page but a link to a booking form. {LINKONLY} is defining a <h ref .....
David
hsriat 1,654
Recognized Expert Top Contributor
Hi,
Thanks for the reply but its not correct. The {LINKONLY} is not a link to a standard page but a link to a booking form. {LINKONLY} is defining a <h ref .....
David
Can you please explain a little bit more what this {LINKONLY} is, and what are to trying to attain?
Can you please explain a little bit more what this {LINKONLY} is, and what are to trying to attain?
At the moment the code looks like this:
<td class="property list_rightcol" width="160" valign="top">
<a href="{MOREINFO RMATIONLINK}">{ MOREINFORMATION }</a>
<br/>{LINKONLY}{BOO KTHIS_TEXT}</a></td>
I think the LINKONLY is replaced by
"<a href=\"".jomres URL("index.php? option=com_jomr es&task=dobooki ng&Itemid=$ Itemid&sele ctedProperty=". $property->propertys_uid) ."\" title=\"".jr_ge ttext('_JOMRES_ FRONT_MR_MENU_B OOKAROOM',_JOMR ES_FRONT_MR_MEN U_BOOKAROOM,$ed itable=false,$i sLink=true)."\" >";
Which is defined in another part of the site.
The {BOOKTHIS_TEXT} is defined as a text link Book Rooms
I would like to replace the Text link with a Styled Button.
David
hsriat 1,654
Recognized Expert Top Contributor
I think that's not possible unless to change {LINKONLY}'s internal string.
When the file will be processed, {LINKONLY} will be replaced to that <a _ _ _ _ _> right?
So you would need to make a change in that part of you code which generates {LINKONLY}.
I think that's not possible unless to change {LINKONLY}'s internal string.
When the file will be processed, {LINKONLY} will be replaced to that <a _ _ _ _ _> right?
So you would need to make a change in that part of you code which generates {LINKONLY}.
Ok Thanks for trying, I will look at it next week.
acoder 16,027
Recognized Expert Moderator MVP
Ok Thanks for trying, I will look at it next week.
It is possible to change it, but it would be better doing this on the server-side.
If you were to do this via JavaScript, you could get the link element either via its ID if you have it set or document.getEle mentsByTagName( "a") and getting the correct link. Then get it's href property for the link and use replaceChild to replace the link with the newly created button which goes to the href link onclick.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Skip Hollowell |
last post by:
I am working on a menu bar for a site, and am using buttons in the bar
(because the customer wants to use accessKeys for each selection,
apparently it is too much work to click on them with a mouse, but I
digress) It seems that the longer the text is in a button, the more
padding there is around that text in the button, thus making the
button itself much to wide, and wasting too much space on the page. I
have tried width:auto in the...
|
by: TrvlOrm |
last post by:
Can any one please help me...I am new to JavaScript and I have been
struggling with this code for days now and can't figure it out.
I would like to get the Buttons to correspond with the action to
either a) generate numbers b) Prompts a user to locate a web page c)
go to previous page in history list d) Loads next page in history list
e) Promps the user for a URL and loads the web page in a new window f)
and Re-Sizes the window.
...
|
by: Sedef |
last post by:
Hi,
i'm trying to create a custom Button user control which will be derived from System.Web.UI.WebControls.Button. the normal server side Button class creates some client side javascript code for its onclick event. it's something like:
<input type="submit" name="Button1" value="Button" onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " language="javascript" id="Button1" />
what i want to do is to be able to...
|
by: IchBin |
last post by:
I am trying to set the state of a radio button. I do not see what I am
doing wrong. Sorry, I am new at this.. I need another set of eyes to
look at this snip of code. I am trying to set the radio button with this
link of code:
echo 'SCRIPT language=JavaScript
setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //?
<snip of code>
|
by: shashi shekhar singh |
last post by:
Dear sir,
I have a word document file contains text and images, now i have saved it as a web page and wants to display it on browser ,
using ,
string str=directory.getfiles("");
response.contentType="text/html";
response .writefile("");
it displayed in different format and images not shown
blank spaces shown as ?????????? and image as X.
| |
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |