Skip to main content
November 1, 2010
Question

<script> refs

  • November 1, 2010
  • 1 reply
  • 471 views

Trying to troubleshoot a problem with a Digital Crew UDI component, which seems to be having trouble locating some <script> files, i.e. I get a bunch of "object expected" errors on all of the javascript functions unless I copy the <script> file into the caller.  Unfortunately this isn't a solution becuase I've got many script tags pointing to a whole host of files.  So my question is "Is there a switch to tell it to use relative or fully quallified paths for script files?"  Originally my tag looked like this:

<script language="JavaScript1.2" src="js_editrecord_dyn.cfm?ref=<cfoutput>#ref#</cfoutput>"></script>

but I've also tried this without any luck:

<script language="JavaScript1.2" src="/dcCom/components/udi/js_editrecord_dyn.cfm?ref=<cfoutput>#ref#</cfoutput>"></script>

Thanks

    This topic has been closed for replies.

    1 reply

    Inspiring
    November 1, 2010

    Passing a url variable into js?  First time I've ever seen that attempted.  Have you ever gotten that to succeed?

    November 1, 2010

    This isn't my code, it comes from the Digital Crew, UDI component.  I'm assuming it works since I've got it scattered across dozens of in-house applications that work.  I don't know why it's having trouble loading this <script> file and not the ones in the other applications.  As I mentioned previously it appears to be having trouble resolving the path, since if I copy the contents of the <script> file into the caller the errors go away.

    Inspiring
    November 1, 2010

    If you pass this:

    /dcCom/components/udi/js_editrecord_dyn.cfm?ref=<cfoutput>#ref#< /cfoutput>">


    into the caller, how does the js pick up the value of #ref#?

    For the pages that it does work, is it sending a variable?