Ext


Go Back   Ext JS Forums > Ext JS Community Forums (2.0) > Ext 2.x: Help

Reply
 
Thread Tools
  #1  
Old 05-21-2008, 10:08 AM
mayura mayura is offline
Ext User
 
Join Date: Nov 2007
Location: India
Posts: 49
mayura is on a distinguished road
Question How to create a hyperlink in Form Panel?

Hi,

I've a very simple requirement. I need a hyper link in my Form Panel.
I've looked at several threads in Ext JS forum but none of them are providing a satisfactory solution.
Please help.

Thanks
Mayura
Reply With Quote
  #2  
Old 05-21-2008, 10:09 AM
deanoj's Avatar
deanoj deanoj is offline
Ext User
 
Join Date: Mar 2008
Location: Yorkshire, England.
Posts: 181
deanoj is on a distinguished road
Default

use the html config option in the items:

html: '<a href="#">link</a>',
Reply With Quote
  #3  
Old 05-21-2008, 10:18 AM
ludhiana ludhiana is offline
Ext User
 
Join Date: Apr 2008
Posts: 83
ludhiana is on a distinguished road
Default

make sure you use {0}

function renderValue(value){
return String.format(
'<b><a href="#" onClick="javascriptomething();javascript:return(false);">{0}</a></b>', value);
}


{header: "Price", width: 35, dataIndex: 'price', sortable: true, renderer: renderValue};
Reply With Quote
  #4  
Old 05-21-2008, 01:23 PM
rudytheng rudytheng is offline
Ext User
 
Join Date: Mar 2008
Posts: 124
rudytheng is on a distinguished road
Default

find out what autoEl in the boxcomponent config option is....
Reply With Quote
  #5  
Old 05-22-2008, 01:15 AM
mayura mayura is offline
Ext User
 
Join Date: Nov 2007
Location: India
Posts: 49
mayura is on a distinguished road
Default

Quote:
Originally Posted by ludhiana View Post
make sure you use {0}

function renderValue(value){
return String.format(
'<b><a href="#" onClick="javascriptomething();javascript:return(false);">{0}</a></b>', value);
}


{header: "Price", width: 35, dataIndex: 'price', sortable: true, renderer: renderValue};
Thanks for your inputs. But I do not want to create a hyperlink in GridPanel but in FormPanel. In GridPanel it can be easily done using renderer.
Reply With Quote
  #6  
Old 05-22-2008, 03:32 AM
shahulhameed shahulhameed is offline
Ext User
 
Join Date: Feb 2008
Posts: 51
shahulhameed is on a distinguished road
Default

try this...


 xtype'box',            
autoEl: {  html:'<a href="">s</a>'
Reply With Quote
  #7  
Old 05-22-2008, 04:10 AM
mayura mayura is offline
Ext User
 
Join Date: Nov 2007
Location: India
Posts: 49
mayura is on a distinguished road
Post

Hey, thanks a lot!
This worked.
{
xtype:'box',
autoEl: {html:'<a href="javascript:test()">Test</a>'}
}
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 03:43 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.