Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Internal name using JavaScript

  Asked By: Parvesh    Date: Apr 12    Category: MOSS    Views: 1921

In MOSS can I get internal names using this code in JavaScript.


document.getElementById("OWS:fieldinternalname:Checkbox")
document.getElementById("OWS:Information_X0020_Tech:Dropdown")

Share: 

 

7 Answers Found

 
Answer #1    Answered By: Malcolm Maxwell     Answered On: Apr 12

Am I the only person who thinks you could check that by putting something
like...


alert (document.getElementById("OWS:fieldinternalname:Checkbox"));
alert (document.getElementById("OWS:Information_X0020_Tech:Dropdown"));

...on the page?

 
Answer #2    Answered By: Mayur Mandal     Answered On: Apr 12

I have already tried this and it didn't work in MOSS. I use this all the
time in SharePoint 2003.

Alert would be something like this

alert
(document.getElementById("OWS:Information_X0020_Tech:Dropdown").value);

 
Answer #3    Answered By: Deana Lowery     Answered On: Apr 12

Sounds like you just need to View Source in the browser and find the HTML
element with the value you want. Then copy/paste its ID into the alert
statement below, and you should have it.

 
Answer #4    Answered By: Felecia Goff     Answered On: Apr 12

I have this code  in the NewForm.aspx of a custom list.


<script language='javascript' for='window' event='onload'>
alert
(document.getElementById("OWS:Information_X0020_Tech:Dropdown").value);
</script>

In 2003 this will return the first value of the dropdown  list. In 2007 it
returns a js error message (Object Required).

 
Answer #5    Answered By: David Scott     Answered On: Apr 12

Here is something similar to what I'm trying to do.
www.webdeveloper.com/.../showthread.php?t=150280. But it doesn't
work in MOSS.

 
Answer #6    Answered By: Lakeshia Gould     Answered On: Apr 12

Yes. I think you are looking for an element whose ID you do not know.
Right-click the page in the web browser, select "View Source", and then use
CTRL-F to find the piece of data you are looking for. Once you find it, you
will see that it is contained within an HTML element. If you look at the
tag, you should see an ID attribute which is what you need to replace
"OWS:Information_X0020_Tech:Dropdown" in the line below.

 
Answer #7    Answered By: Lizbeth Macdonald     Answered On: Apr 12

If you are looking for the constituent controls in a web part on a page take
a look at the following article on using the Web part page services
component in Javascript.



msdn.microsoft.com/en-us/library/ms415880.aspx

 
Didn't find what you were looking for? Find more on Internal name using JavaScript Or get search suggestion and latest updates.




Tagged: