javascript, expression blend and html file

Seosaimh
Seosaimh used Ask the Experts™
on
Hi,

I have a HTML file generated in expression blend. I added some jaavscript to it and saved. but at runtime in expression blend when you hit f5 it overwrites the information with what it has stored, and hence the javascript is lost and it defaults to what it has. Does anybody know how to add my javascript so that it gets included at runtime and does not get overwritten??

Thanks as always.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Expression Blend regenerates the html page each time you build your application.

First of all create a copy of the Html page and add your javascript code to it and save it in a separate location.

Now go to the Project Properties of your project. Select the Debug tab. In the Start Action section, select Specific Page and give the location of your html page.

Author

Commented:
Hi, I did what you said and the testpage.html comes up in the browser empty, no controls nothing, what would that be?

Commented:
It is unable to find the controls in the new location.

rename the testpage.html to any other name and put it in the \bin\Debug folder (or where your .xap file is located). Also provide the new html filename in the Project settings > Start Action > Specific Page.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
did all you requested, and still no luck . Is there anything else I should do? called it consumerscreen.html

Author

Commented:
I can see where I am selecting consumerscreen.html from, but it is not from \bin\Debug folder , reason been as when I go into
Project settings > Start Action > Specific Page   there is no option to go to this folder. any ideas?
Commented:
Ok. Got it.

Now add the consumerscreen.html to your project. The file will now be copied to the folder where your project exists.

Open your consumerscreen.html, go to the tag where your .xap is linked ( it will be a param tag like this

        <param name="source" value="<YouApplicationName>.xap"/> )

You need to provide the path of your .xap file here.  You can either provide the relative or the absolute path. for eg.
        <param name="source" value="/bin/Debug/<YouApplicationName>.xap"/> )

Commented:
Once you add the consumerscreen.html to the project, you will be able to select it in Project settings > Start Action > Specific Page . Click on the button(...) to the right of the edit box.

Author

Commented:
done all of the above. Am i correct in saying when I open Project settings > Start Action > Specific Page  , I should see /bin/debug ?? as if this is the case I cannot at the moment..

Author

Commented:
it is still not working..

Author

Commented:
Hi I got resolved, thanks for all your help..

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial