Adding Text from Field A + Field B into IFRAME

I have created an IFRAME, which we use for displaying each customers file 
directory on our file server.

I want the address of the IFRAME to be exactly this:

1) F:\Customers\
+
2) Data of a text field,

I use the following script

document.all.IFRAME_NAME.src = 'F:\Customers\' + 
crmForm.all.TEXTFIELD.DataValue;

I use this script both in the ONLOAD of the FORM and in the ONCHANGE of the 
TEXTFIELD.

However, it seems only to add the value F:\Customers\ to the IFRAME value 
and not the value of the TEXTFIELD. 

I'm probably just using the wrong syntax, and I hope that someone could 
please help we with the right solution.

Thanks.
0
Utf
10/5/2007 9:54:01 AM
crm 35858 articles. 1 followers. Follow

4 Replies
538 Views

Similar Articles

[PageSpeed] 36

Use the url property of the IFrame control instead:

document.all.IFRAME_NAME.url = 'F:\Customers\' + 
crmForm.all.TEXTFIELD.DataValue;

-- 
David Jennaway - Microsoft Dynamics CRM MVP
Web: http://www.excitation.co.uk



"Thomas H. Bech" wrote:

> I have created an IFRAME, which we use for displaying each customers file 
> directory on our file server.
> 
> I want the address of the IFRAME to be exactly this:
> 
> 1) F:\Customers\
> +
> 2) Data of a text field,
> 
> I use the following script
> 
> document.all.IFRAME_NAME.src = 'F:\Customers\' + 
> crmForm.all.TEXTFIELD.DataValue;
> 
> I use this script both in the ONLOAD of the FORM and in the ONCHANGE of the 
> TEXTFIELD.
> 
> However, it seems only to add the value F:\Customers\ to the IFRAME value 
> and not the value of the TEXTFIELD. 
> 
> I'm probably just using the wrong syntax, and I hope that someone could 
> please help we with the right solution.
> 
> Thanks.
0
Utf
10/5/2007 10:38:01 AM
Thanks. Still cannot get it to work, though.

In the IFRAME, I've defined the URL as F:\Customers\ and the IFRAME displays 
this link.

When I use the script:
document.all.IFRAME_NAME.src = crmForm.all.TEXTFIELD.DataValue;

...it works perfectly, if the TEXTFIELD is filled with e.g. the value 
F:\CUSTOMERS\CLIENTA

However, I want it only to be filled with the value CLIENTA.

There seems to be a problem adding 2 text values together.

"David Jennaway" wrote:

> Use the url property of the IFrame control instead:
> 
> document.all.IFRAME_NAME.url = 'F:\Customers\' + 
> crmForm.all.TEXTFIELD.DataValue;
> 
> -- 
> David Jennaway - Microsoft Dynamics CRM MVP
> Web: http://www.excitation.co.uk
> 
> 
> 
> "Thomas H. Bech" wrote:
> 
> > I have created an IFRAME, which we use for displaying each customers file 
> > directory on our file server.
> > 
> > I want the address of the IFRAME to be exactly this:
> > 
> > 1) F:\Customers\
> > +
> > 2) Data of a text field,
> > 
> > I use the following script
> > 
> > document.all.IFRAME_NAME.src = 'F:\Customers\' + 
> > crmForm.all.TEXTFIELD.DataValue;
> > 
> > I use this script both in the ONLOAD of the FORM and in the ONCHANGE of the 
> > TEXTFIELD.
> > 
> > However, it seems only to add the value F:\Customers\ to the IFRAME value 
> > and not the value of the TEXTFIELD. 
> > 
> > I'm probably just using the wrong syntax, and I hope that someone could 
> > please help we with the right solution.
> > 
> > Thanks.
0
Utf
10/5/2007 11:13:00 AM
I think what David J was getting at was to build the entire URL at runtime 
and disregard the deafult value for the iFrame's URL.
Try this:

// begin script

// assign the field value to a varaible so we can avoid null string problems
   var sCRMName = crmForm.all.TEXTFIELD.DataValue;

//if the value is non-null, then append it to f:\customers\ and assign the 
whole string to the url.
//if the value is null, then just show the f:\customers as a default value
   if (sCRMName  != null)
      {
         crmForm.all.IFRAME_NAME.url="F:\Customers\" + sCRMName;
      }
   else
      {
         crmForm.all.IFRAME_NAME.url="F:\Customers";
      }

// end script


Hope that helps,

Dave Ireland



"Thomas H. Bech" <ThomasHBech@discussions.microsoft.com> wrote in message 
news:FB00A561-4A2F-46F4-80F2-4941D355E09C@microsoft.com...
> Thanks. Still cannot get it to work, though.
>
> In the IFRAME, I've defined the URL as F:\Customers\ and the IFRAME 
> displays
> this link.
>
> When I use the script:
> document.all.IFRAME_NAME.src = crmForm.all.TEXTFIELD.DataValue;
>
> ..it works perfectly, if the TEXTFIELD is filled with e.g. the value
> F:\CUSTOMERS\CLIENTA
>
> However, I want it only to be filled with the value CLIENTA.
>
> There seems to be a problem adding 2 text values together.
>
> "David Jennaway" wrote:
>
>> Use the url property of the IFrame control instead:
>>
>> document.all.IFRAME_NAME.url = 'F:\Customers\' +
>> crmForm.all.TEXTFIELD.DataValue;
>>
>> -- 
>> David Jennaway - Microsoft Dynamics CRM MVP
>> Web: http://www.excitation.co.uk
>>
>>
>>
>> "Thomas H. Bech" wrote:
>>
>> > I have created an IFRAME, which we use for displaying each customers 
>> > file
>> > directory on our file server.
>> >
>> > I want the address of the IFRAME to be exactly this:
>> >
>> > 1) F:\Customers\
>> > +
>> > 2) Data of a text field,
>> >
>> > I use the following script
>> >
>> > document.all.IFRAME_NAME.src = 'F:\Customers\' +
>> > crmForm.all.TEXTFIELD.DataValue;
>> >
>> > I use this script both in the ONLOAD of the FORM and in the ONCHANGE of 
>> > the
>> > TEXTFIELD.
>> >
>> > However, it seems only to add the value F:\Customers\ to the IFRAME 
>> > value
>> > and not the value of the TEXTFIELD.
>> >
>> > I'm probably just using the wrong syntax, and I hope that someone could
>> > please help we with the right solution.
>> >
>> > Thanks. 


0
Dave
10/6/2007 5:46:05 PM
It seems your code is fine, but it seems that I'm having problems appending a 
value to a field in ONLOAD on the Account form.

In a custom form I've created, however, I don't have that problem. In that 
form I use this simple code in ONLOAD, and it works fine:

crmForm.all.fieldname.DataValue = 'TEXT';

In the Account form however, in ONLOAD I try to fill a custom field some 
text using the same code, but it doesn't work - the field is still empty.

I have admin rights, so I'm really having big problems detecting what's wrong.

Anyone else with the same problem?

"Dave Ireland" wrote:

> I think what David J was getting at was to build the entire URL at runtime 
> and disregard the deafult value for the iFrame's URL.
> Try this:
> 
> // begin script
> 
> // assign the field value to a varaible so we can avoid null string problems
>    var sCRMName = crmForm.all.TEXTFIELD.DataValue;
> 
> //if the value is non-null, then append it to f:\customers\ and assign the 
> whole string to the url.
> //if the value is null, then just show the f:\customers as a default value
>    if (sCRMName  != null)
>       {
>          crmForm.all.IFRAME_NAME.url="F:\Customers\" + sCRMName;
>       }
>    else
>       {
>          crmForm.all.IFRAME_NAME.url="F:\Customers";
>       }
> 
> // end script
> 
> 
> Hope that helps,
> 
> Dave Ireland
> 
> 
> 
> "Thomas H. Bech" <ThomasHBech@discussions.microsoft.com> wrote in message 
> news:FB00A561-4A2F-46F4-80F2-4941D355E09C@microsoft.com...
> > Thanks. Still cannot get it to work, though.
> >
> > In the IFRAME, I've defined the URL as F:\Customers\ and the IFRAME 
> > displays
> > this link.
> >
> > When I use the script:
> > document.all.IFRAME_NAME.src = crmForm.all.TEXTFIELD.DataValue;
> >
> > ..it works perfectly, if the TEXTFIELD is filled with e.g. the value
> > F:\CUSTOMERS\CLIENTA
> >
> > However, I want it only to be filled with the value CLIENTA.
> >
> > There seems to be a problem adding 2 text values together.
> >
> > "David Jennaway" wrote:
> >
> >> Use the url property of the IFrame control instead:
> >>
> >> document.all.IFRAME_NAME.url = 'F:\Customers\' +
> >> crmForm.all.TEXTFIELD.DataValue;
> >>
> >> -- 
> >> David Jennaway - Microsoft Dynamics CRM MVP
> >> Web: http://www.excitation.co.uk
> >>
> >>
> >>
> >> "Thomas H. Bech" wrote:
> >>
> >> > I have created an IFRAME, which we use for displaying each customers 
> >> > file
> >> > directory on our file server.
> >> >
> >> > I want the address of the IFRAME to be exactly this:
> >> >
> >> > 1) F:\Customers\
> >> > +
> >> > 2) Data of a text field,
> >> >
> >> > I use the following script
> >> >
> >> > document.all.IFRAME_NAME.src = 'F:\Customers\' +
> >> > crmForm.all.TEXTFIELD.DataValue;
> >> >
> >> > I use this script both in the ONLOAD of the FORM and in the ONCHANGE of 
> >> > the
> >> > TEXTFIELD.
> >> >
> >> > However, it seems only to add the value F:\Customers\ to the IFRAME 
> >> > value
> >> > and not the value of the TEXTFIELD.
> >> >
> >> > I'm probably just using the wrong syntax, and I hope that someone could
> >> > please help we with the right solution.
> >> >
> >> > Thanks. 
> 
> 
> 
0
Utf
10/11/2007 1:59:01 PM
Reply:

Similar Artilces:

Adding a Reference in VBA
In order to run the below code what is the Official exact name of the library I should have added/checked in my Reference table? TIA, Sub Tester1() Dim fso As Object Dim fldr As Object Set fso = CreateObject("Scripting.FileSystemObject") Set fldr = fso.GetFolder("C:\Documents and Settings\Jim\My Documents") MsgBox "You have " & fldr.Files.Count & " Files in the Excel Formulas Folder" End Sub microsoft scripting runtime But then you could change your code to: Sub Tester2() Dim FSO As Scripting.FileSystemObject Dim FLDR As Scripting.Folder ...

pcnetsecurity@gmail.com =?UTF-8?B?QXNzaXN0w6puY2lhIFTDqWM=?= =?UTF-8?B?bmljYSAgbWFudXRlbsOnw6M=?= =?UTF-8?B?byBkZSBjb21wdXRhZG9y?= =?UTF-8?B?ZXMgaW5mb3JtYXRpY2Eg?= =?UTF-8?B?Vml0w7NyaWEtZXMgOTgyNjQ=?=
Contato: pcnetsecurity@gmail.com Contato: pcnetsecurity @ gmail.com Planos a partir de R$ 250,00 . Assist�ncia T�cnica Prestamos assist�ncia t�cnica nos computadores de sua empresa ou resid�ncia, e tamb�m possu�mos uma equipe qualificada para fazer a manuten��o no pr�prio local. - Contratos de Suporte e Manuten��o Reduza os custos de sua empresa com solicita��es de visitas t�cnicas para seus computadores, elaboramos um contrato de manuten��o integrado para sua empresa onde disponibilizamos: t�cnicos, equipamentos de suporte e substitui��o, e atendimento no hor�rio comercial ou ...

populating an Access table from a text file
A text file has data in a format like the below: Title1 Cell 1 data Title 2 Cell 2 data Title 3 Cell 3 data .. .. .. Title 10 Cell 10 data Title 11 Cell 11 data .. .. .. Title 15 Cell 15 data .. .. .. Title N Cell N data I guess I can read this using some VBA code posted at http://www.mvps.org/access/modules/mdl0057.htm and http://www.granite.ab.ca/access/readtextfile.htm, add an Instr function to it so that when I read the text file, I know when to insert the data properly in the table. 1. Is there another way I can directly import the data into an Access 2...

Text is added as attachment after copy and paste
Hi I am using outlook 2000 and every time I want to copy and paste text from somewhere else (e.g. browser), it adds the content as an html-page-attachment to my new mail. I just want to have it added as simple text in the mail-body regards R. Save the text in notepad or something and then Insert the file - but check the button so it inserts it as text, not just as an attachment ;-) r@gnar.de wrote: > Hi > > I am using outlook 2000 and every time I want to copy and paste text > from somewhere else (e.g. browser), it adds the content as an > html-page-attachment to my new ...

Automatically fill down formulas when adding a record
I have a data entry sheet which receives one record per row. Some of th columns contain calculated fields and will be hidden. Is there a way t have the formulas automatically fill down when new records are added Thank you -- Message posted from http://www.ExcelForum.com One way is to use Excels built-in dataform. data>form -- John johnf 202 at hotmail dot com "steveski >" <<steveski.11dx8c@excelforum-nospam.com> wrote in message news:steveski.11dx8c@excelforum-nospam.com... | I have a data entry sheet which receives one record per row. Some of the | columns con...

Run a query based on user input to a text box
I am creating a database to manage Auction Bids for a live radio station phone auction weekend. I have a form where the user is entering names as the bidders call in. I want to be able to have entry into a text box cause a query to run and populate a list box so that if a caller has been entered before, the user can click on an existing name. So for example, if the first keystroke is A , then the list box will be populated with all names beginning with A. If the next keystroke is l to give Al then the list box will be repopulated with only names beginning with Al (e.g. Alice, Aliso...

Payee Matching using Memo Field?
Note sure if this is specific to BofA, or if I'm just missing something.I am using MS Money Deluxe 2004, but also had same prob with 2000 When I download ofx (problems with qif also) statements the Payee or <name> is truncated to 32 char which normally I wouldnt care since money only allows 32 char in the payee feild. Problem is my transactions in the OFX are like this: <NAME>INTERLINK NETWORK TRANS ****** O <MEMO>INTERLINK NETWORK TRANS ****** ON 07-03 CUSTOMER ******** PAYMENT TO ACME Is it possible to auto match Payees using...

Change Regarding Field
Quite often an e-mail thread has been started before a problem in promoted to a case. Because the regarding file is closed in existing e-mails I cannot link them to the case. Any way to change the regarding field or create a copy of the e-mail with an open regarding field? ...

Populate field on resolution of a case
I want to populate a field on the resolution of a case, however when I created a workflow on the update of status equals resolved, it errors saying "the record is marked as readonly" any ideas on how to do this before it is resolved? On 10 jul, 21:44, "Michael San Filippo" <Mich...@datacubesystems.com> wrote: > I want to populate a field on the resolution of a case, however when I > created a workflow on the update of status equals resolved, it errors saying > "the record is marked as readonly" > > any ideas on how to do this before it i...

To make fields invisible using Dexterity Utilities
Hello I know we could use Windows propoerties to make fields visible or invisible on a Window in a form. I understand we could use Dexterity Utilities to make the fields visible or invisible to user. Could anyone say how to do it Dexterity Utilities is not the correct tool to hide fields from a user. You can do this using Modifier, VBA, Field Level Security or Dexterity. Dexterity can either use triggers or you can create an alternate window. David Musgrave [MSFT] Senior Development Consultant Escalation Engineer MBS Support - Asia Pacific Microsoft Business Solutions http://www.mi...

= Text formula problem
Hi Everyone, I am using an excel spreadsheet as a linked table in an access database for an update query. I had it working very nicely for a period of time. I am not sure if some Microsoft update caused a problem or what. The field I use t o update my database didn't work until I used this formula to make a new row. I have a column of numbers which was retrieved from a data miner program it's called Acct. For some reason Access doesn't like the formatting so I insert a blank column to the right and call that PtNum. In the first cell of this column which is C2, I type ...

Resource Assignments View Filtered on Booked Type Field
I have a project that has been cancelled part way through. To deal with this, I've set the Booked Type field to be proposed for all resources in this project. This works great in that the tasks from this project no longer appear in the resources My Tasks view but they do still appear in the Resource Assignments views I have and I don't seem to be able to filter Resource Assignnments on Booked Type. Is that possible or is there another way I should be going about what I want to achieve? Which is to keep a copy of the cancelled projects plan in Project Server for refere...

Writing rules: Looking for text string in HTML Body
I am trying to fight SPAM by deleting messages that contain certain text strings in the body. It seems certain SPAM messages run in streaks and I can get hundreds of the same message but I am unable to block them with my SPAM software so I want to write a rule to delete them. Writing a "normal" rule and selecting: "with '<TARGET TEXT>' in the body" may not work on an HTML message if the sender has disguised that text as follows: Displayed text: a new home purchase HTML Code for same: a n<AJZDE>ew home purcha</LAHIOJ>se How can I fil...

Properly adding CString struction to CList pointer
Hi, I have a member variable for my class that is declared: CList <PARAMITEMS, PARAMITEMS&>m_listParamItems; and it contains a structure with two CString variables, declared as: struct PARAMITEMS { CString strParamName; CString strParam; }; I have a memory leak in my application that is driving me nuts and the only place that I can locate it, is at this section of code: PARAMITEMS* pParam = new PARAMITEMS; pParam->strParamName = (const char*)"FIRST_PARAMETER"; pParam->strParam = strCString; // Test CString allocated with "String" m_listParamI...

how do i show text in the data field of a pivot table?
If you put a text field into the data area of a pivot table, it will summarize the field to show a count, instead of showing the text. You can place the text fields in the Row, Column or Page areas, where their text will show. pum75 wrote: -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

Changing field sze of labels and text boxes independently
I am using Access 2007. I created a report with the wizard. Now I can't change the size of labels or text boxes without all the fields/labels changing in concert. What do I do to permit changing these things individually? Must be simple, but the help function in Acess 2007 I find not very helpful. On the arrange tab, look for the button for Remove. Highlight the controls and click remove. This will ungroup the controls. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "gg" <gg@discussions.microsoft.com> wrote in message news:92DDB6...

Adding field in Scrolling window
Hello: I was wondering how can I add a field in scrolling window if it is not mapped in DB? Thanks candidcarper Use a local field, and assign a value to it in the Fill script on the scrolling window. "ammad_u@yahoo.com" wrote: > Hello: > > I was wondering how can I add a field in scrolling window if it is not > mapped in DB? > > Thanks > > candidcarper > > ...

Allow access to item properties when Adding Items to purchase orde
Allowing access to item properties when adding items to a purchase order would assist in updating information like aliases, etc. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx...

Find field in CRM and Case search in CRM
hey: I have a ton of cases with emails attached/regarding each case individually. How can we search these cases for all cases that have a common element, for example: I want to search all my cases for the word "disconnect" to see if it appears ANYWHERE in the case, email, title, or part of this case. Anyone know how I can do this? FYI: Building a specialized advanced find won't work because I need the ability to search ANY word -- today I want Disconnect tomorrow, latency, etc... Actually, an Advanced Find might be a good way to go, because you can save your Advanced F...

How do I save Visio help text boxes as html
I have a Visio process flow containing help text boxes (mouse overs) and hyperlinks that I want to save as a web document (html). When saved, the help text boxes are no longer available. How do I save as html so that they are available? ...

how to set value of text bounded on combo box?
Hi, I have a combo box with row sours of a table, and there is a text box. What I want to do is once the user selects a value from the combo box, the text box should be filled by a specific data. For example, the combo box has list of names, and once the user select the name; the text box shows the phone number of the selected name automatically. Note: both the name and phone number are in the same table. How can I do that? Make sure that the query for the combobox returns both the name and phone number. The Phone number does not have to be visible in the combobox. In the combobox A...

convert month text (MAR) to month number (3)
I am trying to work with a data set that unfortunately has spit out all the dates in a text format - i.e. 03/01/2009 is MAR 3 2009. Is there a way to convert that text date to an actual date format? Any advice or suggestions are greatly appreciated. Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200912/1 Debug.Print CDate("MAR 3 2009") = 3/3/2009 One problem with the CDate function is that it will bomb out on things that can't be evaluated as a date. Therefore you may want to use the IsDate fun...

Exchange 2007 in AD site with RODC 05-17-10
Hello, My question is if it possible to deploy Exchange server 2007 in an AD site that have RODC only? I know that Exchange cannot work with RODC. I understand that is not much sense in such configuration. But, in principal, can Exchange be in an AD site with RODC only and use a writable DC from other sites for work? On Mon, 17 May 2010 05:08:01 -0700, Vitalii Ponomarov <VitaliiPonomarov@discussions.microsoft.com> wrote: >Hello, > >My question is if it possible to deploy Exchange server 2007 in an AD site >that have RODC only? I know that Exchange canno...

Writing to a text file from different SUBrouteens
I open a file using "job" as my file handler, but no other 'sub' can see the file handler. The debugger stops with the error "object required" Public Sub make_job_file() ' create GEO_FILE Dim fso, f1, job Const ForWriting = 2 Set fso = CreateObject("Scripting.FileSystemObject") fso.CreateTextFile ("geo_job.job") Set f1 = fso.GetFile("geo_job.job") Set job = f1.OpenAsTextStream(ForWriting, True) End Sub Sub jobname() job_name = InputBox("input Job Name", "Job Name", job_name, 100, 1) job.WriteLine "...

Text after non-breaking space truncated: Publisher 2003 WinXP
Hello All, Watch out folks! If you are using non-breaking spaces in your Pub docs and edit your story in Work (Edit-->Edit Story in Word), beware that the character after the non-breaking space is truncated. Also, when you close the Word edit window and return to Pub the characters are truncated in the original Pub doc. Kinda scary. If some one has time, can you test it and see if you get the same behavior. Thanks in advance ...