Click here to Skip to main content
15,905,875 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Opening new PDF in Plumtree portal Pin
Johnny ²24-Sep-08 1:53
Johnny ²24-Sep-08 1:53 
GeneralRe: Opening new PDF in Plumtree portal Pin
kc_krishnan24-Sep-08 23:03
kc_krishnan24-Sep-08 23:03 
QuestionHw to use tooltips for javascript validations Pin
Learning IT23-Sep-08 22:26
Learning IT23-Sep-08 22:26 
AnswerRe: Hw to use tooltips for javascript validations Pin
Johnny ²23-Sep-08 23:21
Johnny ²23-Sep-08 23:21 
GeneralRe: Hw to use tooltips for javascript validations Pin
Learning IT23-Sep-08 23:46
Learning IT23-Sep-08 23:46 
GeneralRe: Hw to use tooltips for javascript validations Pin
Johnny ²24-Sep-08 1:48
Johnny ²24-Sep-08 1:48 
QuestionHow can I convert ASP script into HTM form? Pin
ATC23-Sep-08 16:33
ATC23-Sep-08 16:33 
Question[JavaScript] How to let location.hostname be the function argument ? Pin
oppstp23-Sep-08 7:17
oppstp23-Sep-08 7:17 
Hello,
I am writing an ActiveX control. This control will connect to the remote server then do further processes.
In order to the flexibility, I want to use JavaScript to get the address bar value.
And use this address and pass it into the ActiveX control item in order to connect to the remote server.

Now I know location.hostname can get the hostname of the URL. But if I passed it into the ActiveX, it failed.
I set the breakpoint in the function which is called by JavaScript and checked the argument. But the argument value is bad ptr...
I don't know how to fix it. Do I set the wrong type of argument ? Or JavaScript can't do this feature...(I am a newbie of JavaScript)
Can anybody can help me ?

My Environment : Vista SP1 + VS2005 SP1 + IE7

The JavaScript code is
function OnLogin()
{
  var hostname = location.hostname;
  document.ActiveXClient1.OnLogin(hostname);
}


The corresponding ActiveX code is
BEGIN_DISPATCH_MAP(CActiveXClientCtrl, COleControl)
   DISP_FUNCTION_ID(CActiveXClientCtrl, "OnLogin", DISPID_CV_LOGIN, OnLogin, VT_EMPTY, VTS_BSTR)
   // another DISP_FUNCTION_ID
END_DISPATCH_MAP()

void CActiveXClientCtrl::OnLogin(LPCSTR ip)
{
  // the value of ip : no value, is a bad ptr
  
  // another code are about socket connection
}


Thanks.
AnswerRe: [JavaScript] How to let location.hostname be the function argument ? Pin
oppstp23-Sep-08 17:53
oppstp23-Sep-08 17:53 
QuestionCharacters not appearing on textbox [modified] Pin
omlac23-Sep-08 2:51
omlac23-Sep-08 2:51 
AnswerRe: Characters not appearing on textbox Pin
Shog923-Sep-08 4:27
sitebuilderShog923-Sep-08 4:27 
AnswerRe: Characters not appearing on textbox Pin
omlac24-Sep-08 22:10
omlac24-Sep-08 22:10 
QuestionASX controls events Pin
L Viljoen22-Sep-08 22:13
professionalL Viljoen22-Sep-08 22:13 
AnswerRe: ASX controls events Pin
L Viljoen22-Sep-08 23:46
professionalL Viljoen22-Sep-08 23:46 
QuestionSQL query using Full text Enigine in SQL2005 Pin
phani kumar22-Sep-08 20:12
phani kumar22-Sep-08 20:12 
AnswerRe: SQL query using Full text Enigine in SQL2005 Pin
NeverHeardOfMe22-Sep-08 21:13
NeverHeardOfMe22-Sep-08 21:13 
Questionmulti threading concept in asp.net need help Pin
phani kumar22-Sep-08 20:10
phani kumar22-Sep-08 20:10 
AnswerRe: multi threading concept in asp.net need help Pin
NeverHeardOfMe22-Sep-08 21:17
NeverHeardOfMe22-Sep-08 21:17 
Questionwhat are the causes for IIS hang Pin
ptr_Electron22-Sep-08 19:02
ptr_Electron22-Sep-08 19:02 
AnswerRe: what are the causes for IIS hang Pin
L Viljoen22-Sep-08 22:24
professionalL Viljoen22-Sep-08 22:24 
GeneralRe: what are the causes for IIS hang Pin
ptr_Electron22-Sep-08 23:08
ptr_Electron22-Sep-08 23:08 
GeneralRe: what are the causes for IIS hang Pin
L Viljoen22-Sep-08 23:14
professionalL Viljoen22-Sep-08 23:14 
QuestionIs there a way to convert TimeStamp to DateTime? Pin
hifiger200422-Sep-08 16:04
hifiger200422-Sep-08 16:04 
AnswerRe: Is there a way to convert TimeStamp to DateTime? Pin
NeverHeardOfMe22-Sep-08 21:10
NeverHeardOfMe22-Sep-08 21:10 
AnswerRe: Is there a way to convert TimeStamp to DateTime? Pin
hifiger200422-Sep-08 22:04
hifiger200422-Sep-08 22:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.