473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

onClick action and PHP

Does anyone know if I can run a function when the link is click by writing
something similar to that bellow ?

<a href="" target="_blank" onClick="<? add_product_category(); ?>" >add
Category</a>

This line doesn't do what I want ....

What I want is to click the link and to open a new window which will have a
form to add a Category.
Jul 17 '05 #1
3 3531
Does anyone know if I can run a function when the link is click by writing
something similar to that bellow ?

<a href="" target="_blank" onClick="<? add_product_category(); ?>" >add
Category</a>

This line doesn't do what I want ....

What I want is to click the link and to open a new window which will have
a form to add a Category.


PHP is server side, meaning that all the work is done before it even arrives
to your browser.

To do what you want you need to add some code that is client side,
(JavaScript, .NET etc...)

Simon.
Jul 17 '05 #2
Try with

<a href="link to the site where you have the form"> target="_blank">Add
Category</a>

Regards
Bettina

Jul 17 '05 #3
I just wanted to use a function that creates the form and is already in a
file with all my functions. but At the moment I will create a page just for
this Form.

Thanks anyways !
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Zalek Bloom | last post by:
Hello, Here is my problem: I am displaying to a user a row of buttons. Depending on which button user presses, I want to go to a different URL and to give a different value to a hidden...
4
by: Michael Hill | last post by:
I had this html: <tr id="action" title="click to do something" onclick="alert('mike');"> <td>a</td> <td>b</td> </tr> and it works when I click on the row, but when I try to add it...
2
by: kelvin | last post by:
Hi, I've this piece of code which does not work at all. Can anyone point out my mistake? I've 2 buttons. History button will call verifyFields() function and lead to different page for...
17
by: abs | last post by:
My element: <span onclick="alert('test')" id="mySpan">test</span> Let's say that I don't know what is in this span's onclick event. Is it possible to add another action to this element's onclick...
7
by: RHPT | last post by:
I have a checkbox that I dynamically check (via JavaScript) when the user initiates an action on the page. I want to prevent the user from unchecking the box if that action has been initiated and...
3
by: Michael_R_Banks | last post by:
I'm trying to dynamically build a table that allows users to remove rows when they click a corresponding button. For some reason, whenever I add the button to the table, it never fires the onclick...
1
by: rkhurana | last post by:
Hi I have a <ui:button> setup with onClick and action. See below. The problem is that if I return true in the onClick, then the action handler gets called but not the updateChart(). If I return...
31
by: ajos | last post by:
hi frnds, i have a form,which has 2 input text boxes, the values are entering the text boxes,when i leave the 2 text boxes blank and hit submit a java script gives the message that the 2 fields are...
4
by: since | last post by:
How do I in IE prevent the onclick action from being fired when I am done dragging? have tried "window.event.cancelBubble = true", for onmouseup , onmousedown, and onmousemove handlers. The onclick...
1
by: Jacqui | last post by:
Hi, I am trying to write a webpage that has a form on it, which gets submitted when a button is pressed, but also has an onclick event which does some DOM manipulation to display a waiting page....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
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,...
0
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...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.