cancel
Showing results for 
Search instead for 
Did you mean: 

sen data to javascript pop up

Former Member
0 Kudos

Hi All:

I'm working with CRM IC Web Client, and i have developed a BSP Application wich uses BuPaDetail view, and the requirement is that i need to send the bp number from that view to a javascript pop up when the 'confirm' button is clicked, so i need to know how can i send that value to the pop up

thanks & regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

<script type="text/javascript">

function alert(){

var bpconfirm = "Is bp " + document.getElementById('id').value + " correct?";

alert(bpconfirm);

</script>

in your layout you need to call the function

<htmlb:inputField id="id" value="<%=bp_number%>" visible="false"/>

alert();

at a certain clientside event.

grtz

Koen

Former Member
0 Kudos

Hi Koen:

I've already tryed it, and it didn't worked, here is a piece of the code that i want to show in a popup:

<crmic:gridLayoutCell columnIndex="1" rowIndex="3" colSpan="3"><crmic:label design = "label"

id = "AccountNo"

for = "//Customer/AccountNo"

tooltip = "<%= otr(crm_ic_appl/bupaTooltip3) %>"

text = "<%= otr(crm_ic_appl/bupaAccountNo) %>"/></crmic:gridLayoutCell>

<crmic:gridLayoutCell columnIndex="4" rowIndex="3" colSpan="5"><crmic:inputField id = "AccountNo"

width = "100%"

maxlength = "10"

disabled = "TRUE"

value = "//Customer/AccountNo" /></crmic:gridLayoutCell>

I want to pass the value of the field AccountNo to a popup, but the field is not in a form, so do you have any idea?

Thanks & regards

athavanraja
Active Contributor
0 Kudos
<htmlb:button text          = "Press Me"
                    onClientClick = "javascript:alert('<%= Customer->AccountNo %>');" />

Try this

Regards

Raja

Former Member
0 Kudos

Hi Durairaj:

I've already tried that solution, but still didn't worked, do you have any other idea on how can i do this, it displays the following message error:

FIELD ACCOUNTNO is unknown. its neither in one of the specified tables.

Thanks & regards

athavanraja
Active Contributor
0 Kudos

if this

<crmic:inputField id = "AccountNo"

width = "100%"

maxlength = "10"

disabled = "TRUE"

value = "//Customer/AccountNo" />

is showing the value properly, then the javascript code i had given should work.

can you check the class (of variable Customer) has a attribute called Account No.

also post your code - the code for popup you are using.

Regards

Raja

Former Member
0 Kudos

Hi Durairaj:

I've checked the class of variable Customer and it does not have any attribute called AccountNo, however it has a method called SET_ACCOUNTNO, and it appears to set the value, here is the part of my code in javascript:

function display_bp(){

alert("bp is:"+document.getElementById('AccountNo').value);

}

Thanks & regars

athavanraja
Active Contributor
0 Kudos

once the page is shown in the broswer, go to view source and check whats the Id used for the input field may be its not "AccountNo"

Regards

Raja

Former Member
0 Kudos

Try this, it should work (i have tested it on a dev crm5.0 server, the button was just after the Clear button on the BuPaDetailB2B.htm page)


<%

DATA  : wa_customer_no type string.

wa_customer_no = Customer->GET_ACCOUNTNO( attribute_path = ' ' ).

%>

<htmlb:button text          = "Press Me"
                    onClientClick = "javascript:alert('<%= wa_customer_no %>');" />

Hope it helps .

Regards