Click here to Skip to main content
16,009,391 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Export the PDF file Pin
r aa j24-Sep-08 20:21
r aa j24-Sep-08 20:21 
GeneralRe: Export the PDF file Pin
Ashfield24-Sep-08 21:19
Ashfield24-Sep-08 21:19 
GeneralRe: Export the PDF file Pin
Johnny ²24-Sep-08 22:54
Johnny ²24-Sep-08 22:54 
QuestionTimeZoneInfo or PublicDomain Olson Timezone? Pin
hifiger200424-Sep-08 13:42
hifiger200424-Sep-08 13:42 
QuestionIIS7 melt down [modified - fixed] Pin
Todd Smith24-Sep-08 10:14
Todd Smith24-Sep-08 10:14 
Questioniframe 100% height does not work in IE7 Pin
William Engberts24-Sep-08 4:21
William Engberts24-Sep-08 4:21 
AnswerRe: iframe 100% height does not work in IE7 Pin
Shog924-Sep-08 5:20
sitebuilderShog924-Sep-08 5:20 
QuestionOpening new PDF in Plumtree portal Pin
kc_krishnan24-Sep-08 1:34
kc_krishnan24-Sep-08 1:34 
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 

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.