close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Link from an image

Thread began 1/02/2022 6:32 am by john70964 | Last modified 1/06/2022 10:40 am by Ray Borduin | 27 views | 9 replies |

john70964

Link from an image

Hello Ray
I have been having some problems creating links on pages so decided to go back to basics.
To create pages with links what could be better than to use the
DW Top menu bar - WebAssist - Database - DataAssist Pages.
So there I created The pages Search - Results - Details and all works very well.

One item I wish to change is the dynamic link to go from Results to Details. This is a Magnifying Glass and I wish to use a Field such as the record number or an image.
I tried to adapt the magnifying glass code but could not get this working.
Can you please provide a sample?

I am attaching files

Many thanks

John

Sign in to reply to this post

Ray BorduinWebAssist

Just create a link with:

<a href="mydetails.php?RecNo=<?php echo($WADAboats->getColumnVal("RecNo")); ?>">link text here</a>

Sign in to reply to this post
Did this help? Tips are appreciated...

john70964

Hi Ray,
This is most peculiar in boat-details.php I have directed the link to boatenquiry_insert.php
Link is now
<a href="Enquiries/boatenquiry_insert.php?RecNo=<?php echo($WADAboats->getColumnVal("RecNo")); ?>">

When I run index.php/boat-details.php the link text disappears along with anything below the link.

(I would prefer a button working).
I am attaching the file.
Thanks
John

Sign in to reply to this post

Ray BorduinWebAssist

Your recordset is named: $WADAboats_details

not: $WADAboats

So the getColumnVal() reference has to be updated to use a recordset name that is defined on the page.

Sign in to reply to this post
Did this help? Tips are appreciated...

john70964

Thanks Ray the link now works fine.
I did try to adapt the link code into the button but would you believe no joy?
Can you please show me what it should be?
I have attached the file.
Many thanks
John

Sign in to reply to this post

Ray BorduinWebAssist

php:
<button type="button" onclick="document.location.href='Enquiries/boatenquiry_insert.php?RecNo=<?php echo($WADAboats->getColumnVal("RecNo")); ?>'">click here</button>
Sign in to reply to this post
Did this help? Tips are appreciated...

john70964

Hi Ray
I have pasted the code sent
<button type="button" onclick="document.location.href='Enquiries/boatenquiry_insert.php?RecNo=<?php echo($WADAboats->getColumnVal("RecNo")); >'">click here</button>
in the page, but it is not working also seems to introduce a syntax error at line 336 and lose some of the code when I paste it in.

I am attaching a picture and the file.

Regards
John

Sign in to reply to this post

Ray BorduinWebAssist

That isn't the same as the code I provided.... it should be:

php:
<button type="button" onclick="document.location.href='Enquiries/boatenquiry_insert.php?RecNo=<?php echo($WADAboats->getColumnVal("RecNo")); ?> >'">click here</button>


You have:

php:
<button type="button" onclick="document.location.href='Enquiries/boatenquiry_insert.php?RecNo=

                  <?php echo($WADAboats->getColumnVal("RecNo")); >'">click here</button>



Make sure you copy from the forum post on the web and not your email. Email clients can change the text and make it unusable.

Sign in to reply to this post
Did this help? Tips are appreciated...

john70964

Hi Ray,
I copied the code from above but still have a problem.

I have created 3 attachments which should show the result.
Image 1 shows wth new code
Image 2 shows without new code

Many thanks
John

Sign in to reply to this post

Ray BorduinWebAssist

You have button code:
$WADAboats->getColumnVal("RecNo")

but your recordset is named: WADAboats_details

So the code should be:
$WADAboats_details->getColumnVal("RecNo")

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...