Welcome Guest, Not a member yet? Register   Sign In
[split] Help with popup window?
#1

(This post was last modified: 08-31-2015, 09:54 PM by ciadmin.)

I am new with CodeIgniter. I have taking over a site that was built with CodeIgniter for a client and I moved it to a local hosting company for them. Finally got it to work great except for one specific functionality "schedule_view". Te site is basically an appointments schedule (calendar). When you click on a specific appointment it should open in a separate window so that you can edit the information. I can create the appointment, just can not open it after the fact, it tries but does not open. I am not that experienced with php to begin with.

If someone think they can help, let me know and I will add more information regarding the site.

Thanks,
Reply
#2

(This post was last modified: 09-01-2015, 04:34 AM by PaulD. Edit Reason: type )

Is that an Ajax driven pop up or a jquery popup? Personally I hate popups so this could be your chance to improve the interface.

On rereading, is it a popup or are you talking about opening the page in a different tab? Or is it a modal window, perhaps you have the relevant css missing for it?

Post some code and I will have a look although cannot promise I will see anything.

Best wishes,

Paul.
Reply
#3

(09-01-2015, 04:33 AM)PaulD Wrote: Is that an Ajax driven pop up or a jquery popup? Personally I hate popups so this could be your chance to improve the interface.

On rereading, is it a popup or are you talking about opening the page in a different tab? Or is it a modal window, perhaps you have the relevant css missing for it?

Post some code and I will have a look although cannot promise I will see anything.

Best wishes,

Paul.

Hi Paul and thanks for your quick reply.

In the calendar, when you click on an appointment, a small window pops up with all the info regarding the appointment and one can edit, upload a pdf, change it status. I have attached an example of the window and you can see the calendar behind.

Here is the code for one of the appointment: <div id="1667" class="content" style="background-color:!important" onclick="viewSchedule('1667','calendar/view');return false;">Jared @ 27 Millcrest Court SW</div>
Let me know is there is a particular php file you would need to look at and I can also attach it or better get you to access the site.
Jovette


Attached Files Thumbnail(s)
   
Reply
#4

(This post was last modified: 09-01-2015, 04:12 PM by PaulD. Edit Reason: Just adding in one more bit of info )

Hi,

I cannot really offer any help because you have not posted any relevant Jquery or PHP code of any description. So although I cannot fix it for you I would offer this advice, first you need to identify where it is going wrong. Is it the server side php or your javascript calling the modal window. For jquery, put in some alerts or console logs to see what your JS is actually doing. For php, well there are lots of ways you can check that as I am sure you are aware. Once you know where it is going wrong, fixing it is usually quite straight forward.

Since the problem seems to be the modal window is not opening once you have already opened it once, (assuming all the data changes are being correctly stored) it sounds like your event is not being recognized. Perhaps you removed the event listener or the HTML has been overwritten so you would need to redo the listener, or perhaps you are hardcoding the toggle to be closed so it cannot be re-opened. Check the console and see what error messages you are getting.

It can be a real pain when taking over someone else's code when you get one bit that doesn't work. Personally I love de-bugging code. But debugging badly written code can be very frustrating at times. As a last resort if you are really stuck, start again. Create your own modal window, check you can open and close it, add the form, check again, re-write the php to manage the form data, check it again, remove the old stuff and you are done. Usually when doing this the source of the problem comes to light.

It could be so many things at the moment that it is hard to be of any further help.

I wish you luck with your project. I am fairly certain it is not a CI issue though.

Best wishes,

Paul
Reply
#5

(09-01-2015, 04:10 PM)PaulD Wrote: Paul,

I still need help, the site is www.renoreadyfloors.ca/internal/index.php As you can see it is niched within their .ca public website. It used to be www.renoreadyfloors.net I believe it is still up as we are waiting to have things good before cancelling it. I updated the config.php and database.php and uploaded the database and it all worked great except for the edit window not coming up. All the other window pop ups do work.

I will send you the access to the cpanel to your email.

Thanks,
Jovette


Hi,

I cannot really offer any help because you have not posted any relevant Jquery or PHP code of any description. So although I cannot fix it for you I would offer this advice, first you need to identify where it is going wrong. Is it the server side php or your javascript calling the modal window. For jquery, put in some alerts or console logs to see what your JS is actually doing. For php, well there are lots of ways you can check that as I am sure you are aware. Once you know where it is going wrong, fixing it is usually quite straight forward.

Since the problem seems to be the modal window is not opening once you have already opened it once, (assuming all the data changes are being correctly stored) it sounds like your event is not being recognized. Perhaps you removed the event listener or the HTML has been overwritten so you would need to redo the listener, or perhaps you are hardcoding the toggle to be closed so it cannot be re-opened. Check the console and see what error messages you are getting.

It can be a real pain when taking over someone else's code when you get one bit that doesn't work. Personally I love de-bugging code. But debugging badly written code can be very frustrating at times. As a last resort if you are really stuck, start again. Create your own modal window, check you can open and close it, add the form, check again, re-write the php to manage the form data, check it again, remove the old stuff and you are done. Usually when doing this the source of the problem comes to light.

It could be so many things at the moment that it is hard to be of any further help.

I wish you luck with your project. I am fairly certain it is not a CI issue though.

Best wishes,

Paul
Reply
#6

(09-01-2015, 04:33 AM)PaulD Wrote: Post some code and I will have a look although cannot promise I will see anything.

Hi again,

As you can see from the above I offered help. I cannot log into your admin panel nor fix it for you. Sorry.

You did not post any code. I cannot help any further.

I hope you get your problem with your site solved soon,

Best wishes,

Paul.
Reply
#7

Ok, so I felt bad for you so I had a quick look.

Yes, you have some JS problems. Here is one:


Code:
Unable to get property 'timepicker' of undefined or null reference


It seems you are not checking to see, on making an appointment, if a date has been chosen or not. Once an error occurs like this in JS there will be knock on affects, such as not being able to reopen the window, because the event listener is not being added.

All you have to do is right click and inspect the element in the console window and work through and fix your errors.

I cannot fix this for you, but if you just work through all the errors I am sure you will get it fixed in no time at all. Although you may have already written data to the site that is now 'dirty' or malformed, so you would need to check your table for any odd entries.

I hope that helps in some way,

Best wishes,

Paul.
Reply
#8

One last thing, I noticed that on the 'add_more' link your view is creating something like the following:

Code:
<div float:right; font-size:11px; margin-top:2px; " align="right">

should be more like:

<div style="float:right; font-size:11px; margin-top:2px; " align="right">
So that is why you are unable to open a newly created appointment. You are missing (for some reason) a bit of markup. To find this I just looked at the console and it showed me the exact line causing the error.
The previous error mentioned above is on the 'add_new' link, not the 'add_more'.
You may have more problems, or it might be a simple cut and paste error in a view. 
I hope that helps,
Best wishes,
Paul.
Reply
#9

(09-02-2015, 07:18 AM)PaulD Wrote: Hi Paul,

Thanks so much for your help. I was able to fix the code as mentioned below. It is working great now. I also notice and htaccess file at the root level that I had not transferred and once I did it started to work. HAPPY.

Jovette




One last thing, I noticed that on the 'add_more' link your view is creating something like the following:


Code:
<div float:right; font-size:11px; margin-top:2px; " align="right">

should be more like:

<div style="float:right; font-size:11px; margin-top:2px; " align="right">
So that is why you are unable to open a newly created appointment. You are missing (for some reason) a bit of markup. To find this I just looked at the console and it showed me the exact line causing the error.
The previous error mentioned above is on the 'add_new' link, not the 'add_more'.
You may have more problems, or it might be a simple cut and paste error in a view. 
I hope that helps,
Best wishes,
Paul.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB