Home > Ask the Domino Experts > Questions & Answers > Set a field value using an external JavaScript file
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Set a field value using an external JavaScript file

Jens Bruntt EXPERT RESPONSE FROM: Jens Bruntt

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site
>
QUESTION POSED ON: 04 June 2004
How do I set a field value using an external JavaScript file? When a user selects a menu item, I would like it to call a function. The function would then set a value to a specific field. The value from that field, which would be a name of a view, would then be used to display the correct view in the embedded view.

Menu:

HEASD

External .js file:
function PlacevwForm(viewform){
document.all.view.src=urlAddress +
 viewform + "?OpenForm&Count=-1";
document.forms[0].
ViewName.value = "vwQAMHEASD";
}

Field on Form:
ViewName and editable 
(I would like this to be hidden) 

The embedded view has the Formula: 
ViewName

>
You can do this. But remember that if you go about it this way, you must submit the form to the server; you can't just reload it, because the form would lose the value you put in the hidden field. An alternative to submitting the form is to put the viewname in the URL, like this: http://server/db/form?openform&embeddedviewname=view1. Then, on the form, you can extract that parameter to use in the formula for the embedded view. In R6 this formula would be: @UrlQueryString("embeddedviewname").

Do you have comments on this Ask the Expert question and response? Let us know.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts