This is a migrated thread and some comments may be shown as answers.

Iv tried evrything i could think of now im looking for some help

1 Answer 28 Views
Editor
This is a migrated thread and some comments may be shown as answers.
chris
Top achievements
Rank 1
chris asked on 19 Sep 2008, 11:23 PM
I am currently working on the back end of a shopping cart which is going to have multi languages.It can be see here
www.jlsmedia.com/xxxx/xxxx
username: xxxx
password:xxx

If you click on The categories button then edit a category you will see at the top is the language dependent section and the bottom is stuff that the the same no matter what the language is. Right now i only have 2 tabs but if you go to the languages section you can add more languages which will add more tabs.

My first issue was how to get the values from the tabs which are both the same the same control form just named different so all the elements get different names.
I used a FindControlRecursive function to find the controls ids i was looking for then getting all the values that i needed by request.form(elementid). This worked for everything but the editor. I figured out that the editor does not even post to a hidden text box so i read up some more and found the getHtml() function.
Next what i did was i passed the ids of both my rad controls and my textboxholder controls to the main page to write out some javascript that will run on submit. I am not getting any javasript errors but i am also not getting any results from the editor to post to the text box so that i can retrive the value.
My javascript is as follows.
function SycEditor(){ 
            CategoryLanguageHTMLIDS = CategoryLanguageHTMLIDS.split("|"); 
            ContentHolderTextBoxids = ContentHolderTextBoxids.split("|"); 
            for (f=0;f<=2;f++){ 
                var editor = $find(CategoryLanguageHTMLIDS[f]);  
                var theSelectionObject = editor.getSelection(); 
                var theSelectedText = theSelectionObject.getHtml(); 
                $(ContentHolderTextBoxids[f]).value = theSelectedText; 
                alert(theSelectedText + "heres my text"); 
                alert(CategoryLanguageHTMLIDS[f]); 
            } 
        } 

 Anyone know why it is not working or another way i can get all the values from all the pages i need?

Thanks

1 Answer, 1 is accepted

Sort by
0
chris
Top achievements
Rank 1
answered on 20 Sep 2008, 02:15 PM
I have it. I did not realize that the page load of the main page happened before the page load of the control page so i can insert my main record on the main page. Get the id of that record and then pass it to the control to have to control do its inserts.

A good life cycle chart for newbies.

http://emanish.googlepages.com/Asp.Net2.0Lifecycle.PNG

Tags
Editor
Asked by
chris
Top achievements
Rank 1
Answers by
chris
Top achievements
Rank 1
Share this question
or