Assign Hyperlink to a Button

J

JimL

Stupid question I know - shows you what I know about j-script (or programming
in general)

I have a field, call it "DwgNo" (for drawing number) and fill it in with a
UNC pathbname - eg \\node\directory\filename.dwg.
No problem to add a hyperlink and assign my:DwgNo as the Data Source. Click
the link and the drawing launches using the appropriate application.

However, I would like to implement this with a button - call it the "View"
button (as I think this will give the form a more professional look than a
text-hyperkink "Click here to view".

Right click the Button, Properties, Edit Form Code; OnClick(eventObj). I am
now in uncharted territory. I remember when Basic was just that, basic. Would
someone care to suggests the correct code to "capture" the field information
and preform a "as if I clicked on a hyperlink" action.

Jim L
 
G

Greg Collins [InfoPath MVP]

You cannot assign a hyperlink to a button. You might be able to write some code behind the button to launch the hyperlink, but this might also require full trust.

You can give a vauge appearance of a button by placing your hyperlink inside a short single-row, single-column table with a border and background color. You can set the font color to black, and if you get adventurous, turn off the underline by adding your own <style> block to the view.xsl file.
 
R

rich0336

Why not place Hyperlinked Text ONTO a button? You get the button look, with
the hyperlink function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top