Forums / Developer / How can I create a new object using a hypertext link instead of a button?

How can I create a new object using a hypertext link instead of a button?

Author Message

Stuart Fenton

Tuesday 27 May 2003 11:02:19 am

I want to be able to have a hypertext link that says for example "Manage your address book"

When their is an entry in their address book I can use a hypertext link to take them to it but I want the same link to automatically create a new address book entry if there is none to directly link to.

I can do this using a normal button or a picture button but I want to use a hypertext link instead.

Is this already supported and do you know how it can be achieved.

Thanks
Fats.

-- Stuart

[email protected]
http://www.grandmore.com

Stuart Fenton

Wednesday 25 June 2003 5:46:53 am

So is this a "no way can this be possible, you must be out of your head" scenario.

Just wonderig since I have had no reply in a while and I am sure you all have experieced the same problem.

Has anyone else found a better way of doing this or am I just stupid.

Your help would help me.

The issue is basically that in order to allow a user to admin their own account I can point them to their own user account and after that I can show relational content for them to fill in. I can relate all the objects needed for them under their account without having to list items based upon user id. Which i EZ you cannot do.

So as a better idea I can get them logging in and then present them with their account details. When their details are missing the icon still looks the same (edit or new) but it does a different function. It creates them beacause they are missing.

How can I achive this?

Any idea are greatfully received.

I will let you know how I get on with, I think, is a basic requirment for all webmasters.

Fats.

-- Stuart

[email protected]
http://www.grandmore.com

Selmah Maxim

Wednesday 25 June 2003 6:18:29 am

Hi ..

Try this, make the form normally, but the input types hidden then .. :

<form name="Test" ... >
<input type=hidden value="some value">
</form>
<a href="#" onclick="window.document.Test.submit();">Link</a>

Stuart Fenton

Wednesday 02 July 2003 3:21:27 am

Thanks for your reply.

Sorry for the delay in replying but I was porting my work over to ez3.1 and setting up a Linux box which I hadn't done before so it took me a lot of time.

I have been trying to get the code to work and it does after a fashion but it seems that it is not posting the variables at the same time. I am trying to get the href to post the submit for creating a new object. This gets passed to the "action" event within ez. It does submit but is does not properly pass all the variables to correctly create the object.

Here is the code.

<form name="new_address" method="post" action={"content/action"|ezurl}>
<input type="hidden" name="NodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$content_object.id}" />
<input type="hidden" name="ClassID" value="9" />
</form>
<a href="#" onclick="window.document.new_address.submit();">Create Address Details</a>

Am I doing something obviously wrong?

Your help would be appreciated.

Fats.

-- Stuart

[email protected]
http://www.grandmore.com