drcox
|
Posted: 08/07/2004, 1:41 PM |
|
I am trying to combine the following before (or after) a new record is added or an existing record is updated.
$fldURL and Target="_blank"
So, when the record is created the user would enter say, www.codecharge.com and the code would automatically attach the text at the end to result in....
www.codecharge.com Target="_blank"
as the record. Not sure of the syntax. PHP 4 w/templates CC2.07
Thanks!
|
|
|
drcox
|
Posted: 08/07/2004, 4:14 PM |
|
Sorry, I should have included the code I'm using in the BEFORE INSERT event :
BEFORE INSERT
$tag = "'' Target=''_blank''";
$fldnewurl = $fldlink_url.$tag;
It produces the following result... www.mysite.com' Target='_blank'
Close, but I need the three single quotes to be double quotes. This is my only problem with the code.
Thanks!
|
|
|
drcox
|
Posted: 08/07/2004, 4:39 PM |
|
GOT IT!!!
Okay, when trying to open a field link in a form place the following code in the form's BEFORE INSERT event.
$tag = "\'\' Target=\'\'_blank\'\'";
$fldnewurl = $fldlink_url.$tag;
Create a new field in your database named newurl. This is where the extended url will be stored. $fldlink_url is the field the user enters their URL into. I tried to do this without an additional field but couldn't get it. At least it works! newurl is a hidden field in the form table.
|
|
|
|